In C/C++, the .exe file is automatically generated by the compiler when we run the code. My question is how do you generate the .exe file in Java instead of just hitting run every time when we open up the .java file.
-
Java generates .class files or .jar files, not .exe files. You need a separate tool to compile it through to .exe. A quick search on the net will show you this.S.L. Barth is on codidact.com– S.L. Barth is on codidact.com2015-04-28 07:27:15 +00:00Commented Apr 28, 2015 at 7:27
Add a comment
|
1 Answer
To do that, you'd need to create an Executable .jar file. Here's the instructions on how to do it.