Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to make .exe programs?  RSS feed

 
Richard Hernandez
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is this done(or used) in Java?
 
John Croucher
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have only been using Java for a couple of months but I think I can provide you an anwser.
Once you compile a java source code file, (a file that has the .java extension and is platform independent), a .class file will be created. This is the executable file. You can execute the .class file by typing the java and the .class filename in a windows command prompt. For example if you compile wow.java you will get wow.class. You can execute it by typing "java wow".
Hope this is the information you are looking for.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are software packages that will package together a JVM and your actual class files to make an EXE file that can be run much as you would any other Win32 file (or other OS). It's a bit overkill IMO, but if that's what you really need, the solutions are out there.
The executable JAR is probably a more reasonable approach for you. Make sure you don't rule it out.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!