hi all, I'd like to know whether it's possible to compile a java program into actual machine code so that the program runs without the need for the Java Runtime.
If it's possible how can it be done?
Thanks in advance.
Hi!
If what you're attempting is, to have an executable which will run on a system without the JRE, there are possibilities. However, your program will loose platform-independence and might become slower.
For Windows systems for example, just search the web for "jar to exe" or similar. Then all you'll have to do is create a jar-file of your program and use the software found by that search to create an executable file from it.
Depending on your code, a cross-compiler might be another solution - if you have it translated for example to C++ (or C for that matter), you could compile it to an executable directly. However this will not work in all cases and you'd possibly be better of with either using the above method or rewriting your program in a different language (that is, if you really want to do without the JRE).
Greetings,
Nepomuk