简体   繁体   English

JAVA_HOME 环境变量不指向 JDK 或 JRE

[英]JAVA_HOME environment variable does not point to JDK or JRE

I've got a problem when starting up java application (.exe) instead of .jar .启动 java 应用程序 (.exe) 而不是 .jar 时出现问题。 FYI, I've got a procedure on the track such as installing java (JDK 7 & JRE 7), using environment variables JAVA_HOME & EXE4J_JAVA_HOME.仅供参考,我有一个程序,例如安装 java(JDK 7 和 JRE 7),使用环境变量 JAVA_HOME 和 EXE4J_JAVA_HOME。 But, when I take a look at control panel, Java(TM) 7 wasn't there.但是,当我查看控制面板时,Java(TM) 7 并不存在。 Here's the image that I get when I startup my .exe这是我启动 .exe 时得到的图像

在此处输入图像描述

when I click ok, this is the result当我单击确定时,这就是结果

在此处输入图像描述

在此处输入图像描述

Very appreciate the others' help.非常感谢其他人的帮助。 Thank you谢谢

Try this and post the result:试试这个并发布结果:

Go to: Control Panel » System » Advanced » Environment Variables » System Variables转到: Control Panel » System » Advanced » Environment Variables » System Variables

Look for the JAVA_HOME and post the value of the variable.查找 JAVA_HOME 并发布变量的值。 Next, go to file explorer and search for the path that you have copied from the JAVA_HOME variable.接下来,转到文件资源管理器并搜索您从 JAVA_HOME 变量复制的路径。

Do you have the folder mentioned on the system varible here?你有系统变量中提到的文件夹吗?

To get a 64-bit executable, select the check box on "Executable info->32 bit or 64 bit" step of the exe4j wizard.要获得 64 位可执行文件,请选中 exe4j 向导的“可执行信息->32 位或 64 位”步骤上的复选框。

The fact that you see multiple error message windows is a bug and will be fixed in the next release.您看到多个错误消息窗口的事实是一个错误,将在下一个版本中修复。

What is your system specs.你的系统规格是什么。 Is it 32 bit or 64 bit.是32位还是64位。 check the JAVA installation which you have matches the system/OS specs.检查您的 JAVA 安装是否与系统/操作系统规格相匹配。

There are 2 options.有 2 个选项。 Either compile your java application with a 64 bit java compiler (which u already have) OR you can install a java 32 bit installation and set you JAVA_HOME to point to that64 bit java should take care of java apps compiled in 32-bit environment.使用 64 位 java 编译器(您已经拥有)编译您的 java 应用程序,或者您可以安装 java 32 位安装并将您的 JAVA_HOME 设置为指向 64 位 java 应该处理在 32 位环境中编译的 java 应用程序。

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

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