开发者

How do you implement a portable JVM into your program?

So I've heard of programs that have some sort of portable JVM that runs in their program, so it can run on any computer, no开发者_运维问答 matter what, with no dependencies.

How did they do that?


Avian is designed to work this way. You build your app as a native executable for whatever platform(s) you need to support, and that executable contains the VM, an embedded JAR containing your Java classes and resources, and any JNI code your app requires.


If what you're looking for is have a portable version of a JRE, you can just zip your own JRE/JDK and have your program use it.

See my answer on a related question.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜