I want to know if it\'s possible to open a file in my program that is written in java just by doing a double click on the file?
For example: On my desktop is a file
"Opening" files by double clicking is a feature of windows OS that is controlled by mapping file extension to specific program.
If you want to run java program packed in jar file you have to create so called "runnable" jar and map jar extension to program named java or javaw.
jar
java
javaw