简体   繁体   English

在非JDK /非JRE安装系统中运行Java应用程序的问题

[英]Problem in Running Java Application in Non JDK/ Non JRE installed system

I am working in a java application. 我在java应用程序中工作。 It is desktop application for Windows Operating System. 它是Windows操作系统的桌面应用程序。 I am creating a installer for my application. 我正在为我的应用程序创建安装程序。 My application works fine for the system where jdk is insalled. 我的应用程序适用于安装jdk的系统。 I also want to run my application where jdk/jre is not present. 我还想运行我的应用程序,其中jdk / jre不存在。

For this i am providing jre1.7 along with the installer. 为此,我将提供jre1.7以及安装程序。 I am using advanced installer for creating exe form my application's jar file and providing JRE 1.7 along with all the lib files which requires in my application. 我正在使用高级安装程序来创建我的应用程序的jar文件,并提供JRE 1.7以及我的应用程序中所需的所有lib文件。

When i install application in non jdk/jre system. 当我在非jdk / jre系统中安装应用程序时。 It gets installed properly but when i try to run the application, it shows "Missing JRE","Java Runtime Environment Not Found." 它安装正确,但是当我尝试运行应用程序时,它显示“Missing JRE”,“找不到Java运行时环境”。

when i install application it gets successfully installed along with JRE 1.7 lib files. 当我安装应用程序时,它与JRE 1.7 lib文件一起成功安装。

I want my application to recognize JRE 1.7 automatically, which i am providing along with the installer. 我希望我的应用程序能够自动识别JRE 1.7,我将与安装程序一起提供。

Please guide me that what can be to recognize JRE for my application that i am providing along with the installer. 请指导我为我的应用程序识别JRE以及安装程序。

I thanks to your all valuable suggestions. 我感谢你们所有宝贵的建议。

It should work out of the box . 它应该开箱即用 Maybe check if you didn't mistakenly bundle an x64 JRE with your app? 也许检查一下你是否错误地将x64 JRE与你的应用捆绑在一起?

You may want to enclose a Java 6 runtime instead. 您可能希望包含Java 6运行时。 Java 7 has not been released yet. Java 7尚未发布。

It sounds like you are just unpacking the files. 听起来你只是解压缩文件。 For this to work correctly you must either explicitly invoke the java.exe file in the destination library, or the Java installer must be run to register properly with Windows. 为了使其正常工作,您必须显式调用目标库中的java.exe文件,或者必须运行Java安装程序才能正确注册Windows。

Get the MSI version (for Windows) and tell your installation program to install it. 获取MSI版本(适用于Windows)并告诉安装程序安装它。

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

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