开发者

Java server jvm installation on windows 32 bit systems

I am trying to bundle java as a part of a java product that should be installed silently with a single click and are having some issues:

My installation has the following requirements: Has no be silent and require no user input or action excpect a doubleclick on the installation file (no configuration and post install steps) Has to setup java so that JAVA_HOME points to a Java SE installation with a server jvm

Is this at all possible to do this on a win32 system with sun java installers? I know that by default the jre does not contian a server jvm. But even when installing the jdk the public jre which is installed (and mapped to JAVA_HOME) does not contain a server jvm. In sun own README file (Sun README) they suggest copying the files:

jre\bin\server\ On Microsoft Windows platforms, the JDK includes both the Java HotSpot(TM) Server VM and Java HotSpot Client VM. However, the Java SE Runtime Environment for Microsoft Windows platforms includes only the Java HotSpot Client VM. Those wishing to use the Java HotSpot Server VM with the Java SE Runtime 开发者_JAVA百科 Environment may copy the JDK's jre\bin\server folder to a bin\server directory in the Java SE Runtime Environment.

But this solution is difficult to automate gracefully in a silent install. There has to be a better way to do this without repackaging the entire java distrubution. Has anyone encountered the same problem and come up with a more elegant solution?


For the past years, I manage Java like this: I download the installer, install it somewhere, package all files into a ZIP and then use that ZIP file to deploy Java anywhere. The installer will leave a lot of stuff in the registry and %WinDir%, etc. which you don't really need. This also allows me to move some files around (like the bin\server\jvm.dll or security related settings).

That way, I can even embed Java inside the application directory, independent of any already installed version of Java.

Just set JAVA_HOME in a small batch script before starting your application and you're good. You can use %~dp0 to make it completely position independent (%~dp0 expands to the path leading to the batch file).


Make your own installer.

I use inno setup compiler, works well for my purpose. If you need the registry entries, you can export them, include them in the installer, include the files, and a little change here and there and you're done. Silent installer that configures things to the exact specifications you need.

It comes with an easy to use script wizard.

I mention a specific one because it's free. Ultimately, making your own installer is the solutions.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜