java 安装后找不到java但运行java程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12092112/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 07:33:10  来源:igfitidea点击:

java not found after install but java programs run

javajava-7

提问by Skierz

I updated my java to JDK 7 today and after installing I can run java programs and eclipse runs fine but http://www.java.com/en/download/installed.jspsays no working java detected. Also Minecraft won't log in and tekkit cant load anything from the internet. I have tried adding java to the PATH variable to no avail. What am i missing?

我今天将我的 java 更新到 JDK 7,安装后我可以运行 java 程序并且 eclipse 运行良好,但http://www.java.com/en/download/installed.jsp说没有检测到工作的 java。此外,Minecraft 无法登录并且 tekkit 无法从 Internet 加载任何内容。我曾尝试将 java 添加到 PATH 变量无济于事。我错过了什么?

回答by AlexR

Ok, java is not detected on my machine by this jsp as well.

好的,这个jsp也没有在我的机器上检测到java。

I believe this happens because JSP cannot reallydetect java installedon your machine. It can only detect version of Java plugin installed on your current browser. So, you have to install java plugin (if you need it).

我相信这是因为 JSP 无法真正检测到您机器上安装的java 。它只能检测您当前浏览器上安装的 Java 插件版本。所以,你必须安装java插件(如果你需要的话)。

回答by Martin Wilson

Installing the JDK doesn't necessarily install the Java plugin in your browser(s). Assuming you are on Windows, follow these steps:

安装 JDK 不一定会在您的浏览器中安装 Java 插件。假设您使用的是 Windows,请执行以下步骤:

  • Open Control Panel
  • Open Java
  • Click the 'Java' tab
  • Click 'View'
  • Click the checkbox in the 'Enabled' column for the JRE you want to enable. If you can't see one then click 'Add' to add it (by specifying the path to the java exe)
  • Restart your browser
  • 打开控制面板
  • 打开 Java
  • 单击“Java”选项卡
  • 点击“查看”
  • 单击要启用的 JRE 的“已启用”列中的复选框。如果您看不到,请单击“添加”以添加它(通过指定 java exe 的路径)
  • 重新启动浏览器