在NetBeans安装程序中包含(捆绑)JRE? [英] Include (bundle) a JRE within the NetBeans Installer?

查看:245
本文介绍了在NetBeans安装程序中包含(捆绑)JRE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在NetBeans平台(RCP)上开发了一个Java Swing应用程序。我希望将Windows JRE包含在NetBeans生成的安装程序中,以防PC没有安装JRE,但我不知道如何执行此操作。我试图按照以下说明但失败了(我发现说明假设您完全知道JDK和JRE上的所有内容,例如我会得到消息'pack200'不被识别为内部或外部命令...它似乎有些路径错了或过时了):

I developed a Java Swing application on the NetBeans Platform (RCP). I want to include the Windows JRE with the installer that NetBeans generates in case a PC does not have JRE installed, but I do not know how to do this. I have tried to follow the following instructions but failed (I find that the instructions assume that you know absolutely everything on JDK and JRE, for example I would get the message 'pack200' is not recognized as an internal or external command...it would seem that some paths are wrong or outdated):

如何在安装程序包中捆绑JVM(JRE / JDK)?

将JRE包含在NetBeans平台安装程序中

通过应用程序的安装程序通过Windows安装JRE

我正在尝试打包JRE版本7u7

I am trying to pack the JRE version 7u7

我的JDK文件夹结构如下:
C:\Program Files\Java \

My JDK folder structure is the following: C:\Program Files\Java\

在这里我有以下两个文件夹:
jdk1.7.0_07 和 jre7

in here I have the following two folders: jdk1.7.0_07 and jre7

请帮帮我...非常感谢

Please help me...Thank you so much

推荐答案

我已在您的链接中跟随通过应用程序的安装程序通过Windows安装JRE 以成功创建Windows安装程序我的Netbeans平台应用程序。
您遇到的问题是什么?

I have followed "Installing the JRE via an Application's Installer via Windows" in your link to successfully create a Windows installer for my Netbeans platform application. What are the problems you encountered?

'pack200'未被识别为内部或外部命令是因为% JAVA_HOME%/ bin不在您的PATH(环境变量)中。您可以使用
运行pack200C:\Program Files \Java \ _jdk1.7.0_07 \ bin \ package200-J-Xmx1024m rt.jar.pack.gz rt.jar

"'pack200' is not recognized as an internal or external command" is because %JAVA_HOME%/bin is not in your PATH (environment variable). You can run pack200 with "C:\Program Files\Java\jdk1.7.0_07\bin\pack200" -J-Xmx1024m rt.jar.pack.gz rt.jar

顺便说一下,文章中的app.conf = nbproject / my.conf部分似乎已经过时了。我必须在我的项目中直接修改文件build / launcher / etc / app_name .conf。

Btw, it seems like "app.conf=nbproject/my.conf" part in the article is outdated. I have to modify directly the file "build/launcher/etc/app_name.conf" in my project.

这篇关于在NetBeans安装程序中包含(捆绑)JRE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆