NetBeans安装程序无法正确定位Java [英] NetBeans installer Not locating Java properly

查看:210
本文介绍了NetBeans安装程序无法正确定位Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装NetBeans所有"程序包,而且我很确定自己已经安装了Java SE Development Kit,但是找不到合适的位置,它带有错误.

I'm trying to install the NetBeans "all" package, and, I'm pretty sure I already have Java SE Development Kit installed, however, it's not locating it properly, it comes with an error.

Java SE Development Kit (JDK) was not found on this computer

所以我运行了CMD并输入:

So I ran the CMD and typed:

netbeans-7.1.3-windows.exe --javahome "C:\Program Files\Java\jdk1.7.0_25"

在检查时,我位于正确的目录(E:\ Mark \ Downloads)中,该目录应该是netbeans的安装文件.按ENTER键后,它确实找到了JDK,但是找不到JRE并提出了此错误.

As I checked, I was in the right directory (E:\Mark\Downloads) where the setup file of netbeans is supposed to be. After pressing ENTER, it did locate JDK, however it would not locate JRE and came up with this error.

Java Runtime Environment (JRE) was not found
There is no JRE at the specified location C:\Program Files\Java\jdk1.7.0_25

因此,我尝试安装Oracle的JDK + NetBeans软件包[用于Windows的x86(32位)(我正在运行32位Windows XP SP3,因此应该可以使用)],但它说与以下版本不兼容我当前的平台.我还尝试了--jdkhome,但它似乎根本没有用.拜托,这已经持续了两天.

So I tried installing the JDK+NetBeans Bundle by Oracle [x86 (32-bit) for Windows (I'm running a 32-bit Windows XP SP3 so it should have worked)] but it says that it's not compatible with my current platform. I also tried --jdkhome but it didn't seem to work at all. Please, this has been going on for two days.

推荐答案

exe似乎是jar安装程序的包装.您可以解压缩jar安装程序并运行它.

The exe seems to be a wrapper for a jar installer. you can extract the jar installer and run that.

 .\netbeans-8.2-javase-windows.exe --extract netbeans
 java -jar netbeans\bundle.jar

上面的

'netbeans'是您想要bundle.jar提取到的文件夹的名称.

'netbeans' in the above is the name of the folder you want the bundle.jar extracted to it could be anything.

我有一个类似的错误消息,无法使它与--javahome选项一起使用,但运行jar可以正常工作.

I had a similar error message and couldn't get it to work with the --javahome option but running the jar worked fine.

这篇关于NetBeans安装程序无法正确定位Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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