简体   繁体   English

使用JVM部署应用程序

[英]Deploying Application with JVM

Our customer wants us to ship his application with an embedded JVM. 我们的客户希望我们使用嵌入式JVM发布他的应用程序。 We tried to convince him otherwise but had no luck. 我们试图说服他,但没有运气。

Now, here is the way we are contemplating taking. 现在,这是我们考虑采取的方式。 We want to take the Apache Harmony VM and libraries. 我们想要使用Apache Harmony VM和库。 We would then strip everything we don't need and ship the application with the bare minimum in terms of libraries. 然后,我们将剥离我们不需要的所有内容,并在库中提供最低限度的应用程序。

My questions are thus: 我的问题是这样的:

1) Where can I find detailled explanations about the functionality provided by the different libraries (natives and classes) coming with a JVM? 1)在哪里可以找到有关JVM附带的不同库(本机和类)提供的功能的详细说明?

2) How can i know if a JVM library file is needed or not? 2)我怎么知道是否需要JVM库文件?

I know the questions are a bit convoluted, but i hope somebody out there have done something similar. 我知道这些问题有点令人费解,但我希望那里的人做过类似的事情。

Regards, Gregoire. 此致,格雷瓜尔。

It looks like you can also distribute the Sun JDK if you do not modify anything (I would consult a lawyer to be sure). 如果您不修改任何内容,您似乎也可以分发Sun JDK (我会咨询律师以确定)。

Whichever way you go I would not prune anything, that would make it more complicated if and when you needed to upgrade the client's software. 无论你采取哪种方式,我都不会修剪任何东西,如果你需要升级客户端的软件,这将使它变得更加复杂。

The problem is not the license of Sun/Oracle, they allow redistribution of the Java Runtime Environment, so developers can embed it into their application installation packages. 问题不在于Sun / Oracle 的许可 ,它们允许重新分发Java Runtime Environment,因此开发人员可以将其嵌入到他们的应用程序安装包中。

However, the problem is export regulations . 问题是出口法规 By law, you may not export parts of the JRE to certain countries, so you would have to check whether your customers are in the allowed list of countries before they can download your application package which includes the JRE. 根据法律规定,您不得将部分JRE出口到某些国家/地区,因此您必须先检查您的客户是否在允许的国家/地区列表中,然后才能下载包含JRE的应用程序包。 This for example applies to such things as the Java Cryptography. 例如,这适用于诸如Java密码术之类的东西。

  • Use a Sun JVM embedded within your application and start it with the invocation API . 使用嵌入在应用程序中的Sun JVM,并使用调用API启动它。 That way you could save some more diskspace :) IBM has an example source code how to start the JVM. 这样你可以节省更多磁盘空间:) IBM有一个示例源代码如何启动JVM。
  • Try launch4j to bundle the JVM with your application and save some work. 尝试使用launch4j将JVM与您的应用程序捆绑在一起并保存一些工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM