开发者

Make Java program as independent exe (run without JVM)

开发者 https://www.devze.com 2023-03-20 16:02 出处:网络
Is there any way to make Java program as independent exe (开发者_JAVA技巧run without JVM)?I\'ve used Excelsior JET to compile my Java into a native executable file on Windows. It worked real well. The

Is there any way to make Java program as independent exe (开发者_JAVA技巧run without JVM)?


I've used Excelsior JET to compile my Java into a native executable file on Windows. It worked real well. There are always opportunities for gotchas - I think JNI is a problem - but I was pretty happy.


http://gcc.gnu.org/java:

GCJ is a portable, optimizing, ahead-of-time compiler for the Java Programming Language. It can compile Java source code to Java bytecode (class files) or directly to native machine code, and Java bytecode to native machine code.

Compiled applications are linked with the GCJ runtime, libgcj, which provides the core class libraries, a garbage collector, and a bytecode interpreter. libgcj can dynamically load and interpret class files, resulting in mixed compiled/interpreted applications. It has been merged with GNU Classpath and supports most of the 1.4 libraries plus some 1.5 additions.


look at this article http://www.excelsior-usa.com/articles/java-to-exe.html and this answer How can I convert my Java program to an .exe file?


:) Just a example, you can build exe with internal JVM and user will see just exe file but your JAVA program will start and work on internal JVM for this case you can use exe4j

0

精彩评论

暂无评论...
验证码 换一张
取 消