title: How to associate a file with a program in java
body: <p>Take notepad for example.  You can open a file with notepad (right click and open with, or double clicking on the file if it is already associated with notepad) and it will display the contents of a file.  I want to be able to open an xml file with the program that I am writing so that it can do some parsing and give a desired output.  What sort of ways are there to do this in java?  Do I have to ask for an argument to be passed into the program when it is opened?  Would this be easier in C++ or some other language?  If you need any further information please let me know -- this was the best way I could come up with to discribe my situation, which may be why my google searches have come up empty.  Thank you in advance for your help!</p>