I have a java code that makes input and saves data as a text file. To problem is that I want the user to double-click an icon that contain an .exe file with the java code inside. In order words, the double click on that item replaces the run command on java. I want to wrap the java code somehow. Thank you!
Asked
Active
Viewed 93 times
0
-
Have a look: https://stackoverflow.com/questions/46860679/self-contained-applications-built-in-java – PM 77-1 Oct 19 '20 at 16:53
-
did you create .jar file ? if you are and it works you can just follow this tutorial https://javatidbits.wordpress.com/2016/04/21/creating-exe-files-for-java-apps-using-launch4j/ – aziz k'h Oct 19 '20 at 17:00
-
2Does this answer your question? [Self-Contained Applications, built in Java](https://stackoverflow.com/questions/46860679/self-contained-applications-built-in-java) – ecoplaneteer Oct 19 '20 at 18:56
1 Answers
0
A workaround approach is to pack the java as jar. It will execute on double click applied java jdk installed and environment variables set.
But still in this approach we don't create a exe file. Rather run the java jar.
Should work with both windows and ubuntu...
https://askubuntu.com/questions/192914/how-run-a-jar-file-with-a-double-click

Ayush v
- 351
- 2
- 9