Double Clicking Executable Jar File
I used eclipse to export a project as an executable jar file. The output jar file was able to be executed by double clicking the .jar icon. I tried to make an executable jar without the help of eclipse (using the command prompt)and I ran into an issue where I can run my program from my jar file using the command prompt (java -jar <jar file>) but I cannot run my program by double clicking the .jar icon (which I could do when I used eclipse).
Does anyone know how I can make my .jar file execute by double clicking it? I know I can use a .bat file to make my program executable but my main goal is to try and reproduce the same behaviour as the eclipse executable jar file (for learning purposes).
Thanks in advance.