How to compile java to exe
By doing that you will ruin the purpose of Java. However, I upvoted your question inorder to more people see this. Java is cross platform, and when you compile the code it will give you .jar file which you can run on almost every OS. So, basically there is no logical reason to build an exe from Java code. So, dont :)
Java compile to .class files you however have a standalone package of .jar files for dist that will be platform independent with all the libraries it is basically a compression which Java understands however if you are interested in .exe there are many of .jar to .exe convertor they just add some instructions that can be run without jre but be highly cautious as there are many viruses which tell them to be such tools and then makes a bad program and you yourself run it and destroy. I recommend using .jar they can run anywhere execute faster and need no tools
Its java. Use .jar format. If you use IDE, try its project builders to create .jar file. If you want to compile from terminal use command: $ jar cfe myJar.jar myClass myClass.class
you can use an application called JSmooth, it packages the .jar into an .exe
You can use third party software.
If you're using Windows, IExpress would be useful, it's a packer, it also show options related to installation methods.
I would say that most easiest is Launch4J.
just use what is better 4 u, but i use launch4j