I'm trying to find a java compiler that I can use to compile my java code into native binaries on different operating systems. I have heard of the GNU Compiler for Java but I can't seem to find a download for that and I think it's dead anyway. Are there any good up-to-date compilers out there that I can use to compile java code into a .exe and a .app or anything or can you tell me how to get the GNU Compiler for Java.
-
1Why do you want to do this - what problem do you hope to solve?– JesperMay 3, 2013 at 14:01
-
Also can you tell me how I can improve on asking these questions I'm a little bit new to this website and I'm not very good at asking questions.– kzolp67May 3, 2013 at 14:01
-
To keep my programs as closed source as possible– kzolp67May 3, 2013 at 14:01
-
1This Question lists some alternatives: stackoverflow.com/questions/4035538/…– Stephen CMay 3, 2013 at 14:03
-
2Closed source is about licensing ... not about whether people can reverse engineer your code.– Stephen CMay 3, 2013 at 14:05
2 Answers
GNU Compiler for the Java can be found at http://gcc.gnu.org/install/binaries.html
And you may try the following tools:
gcj is a part of gcc.
Although judging by it's support for "some 1.5 additions" it is out of date. Why are you bothering though? You can setup an installer that updates the jre instead.
-
1What do you mean you can setup an installer that updates the jre instead.– kzolp67May 3, 2013 at 14:16
-
-
launch4j only wraps the jar in an exe it is still extractable to a normal jar– kzolp67May 3, 2013 at 14:22
-
2I know, I was stating that something like launch4j would be a better option than native compiling. If you absolutely have to have native code then develop using c++. Java wasn't made for it.– axle_hMay 3, 2013 at 14:42