java JAVA_HOME 环境变量未指向 JDK 或 JRE
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/42087879/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JAVA_HOME environment variable does not point to JDK or JRE
提问by syaloom
I've got a problem when starting up java application (.exe) instead of .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. But, when I take a look at control panel, Java(TM) 7 wasn't there. Here's the image that I get when I startup my .exe
我在启动 java 应用程序 (.exe) 而不是 .jar 时遇到问题。仅供参考,我在赛道上有一个过程,例如安装 java(JDK 7 和 JRE 7),使用环境变量 JAVA_HOME 和 EXE4J_JAVA_HOME。但是,当我查看控制面板时,Java(TM) 7 并不存在。这是我启动 .exe 时得到的图像
when I click ok, this is the result
当我点击确定时,这是结果
Very appreciate the others' help. Thank you
非常感谢其他人的帮助。谢谢
回答by Ingo Kegel
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.
您看到多个错误消息窗口的事实是一个错误,将在下一个版本中修复。
回答by learner
What is your system specs. Is it 32 bit or 64 bit. check the JAVA installation which you have matches the system/OS specs.
你的系统规格是什么。是 32 位还是 64 位。检查您的 JAVA 安装是否与系统/操作系统规格相匹配。
There are 2 options. 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.
有2个选项。要么使用 64 位 java 编译器(您已经拥有)编译您的 java 应用程序,或者您可以安装 java 32 位安装并将您的 JAVA_HOME 设置为指向该 64 位 java 应处理在 32 位环境中编译的 java 应用程序。
回答by Alejandroppir
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. Next, go to file explorer and search for the path that you have copied from the JAVA_HOME variable.
查找 JAVA_HOME 并发布变量的值。接下来,转到文件资源管理器并搜索您从 JAVA_HOME 变量复制的路径。
Do you have the folder mentioned on the system varible here?
你有系统变量中提到的文件夹吗?