JAVA_HOME指向错误的地方 [英] JAVA_HOME points to the wrong place

查看:360
本文介绍了JAVA_HOME指向错误的地方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎有一个错误指定的JAVA_HOME变量。我可以绕过很多事情,但现在我似乎被卡住了。我尝试使用Google App Engine并上传应用程序。



当我这样做时,我得到的错误是:


无法找到基于java.home的javac可执行文件,试过C:\ Program Files \Java\jre6\bin\javac.exe和C: \程序文件\Java\bin\javac.exe


我不明白为什么它在那里,正在执行echo%JAVA_HOME%给我:


C:\程序文件\Java\jdk1.6.0_14


这是Java实际存在的地方。我想我最好的希望可能就是把Java放在寻找它的地方 - 你能想到更好的东西。

解决方案

看起来可能是一个bug:



http://code.google.com/p/googleappengine/issues/detail?id=1226



的建议解决方法/解决方案,但评论#24 在错误条目中似乎很有希望:


问题是,
Eclipse的GAE插件默认配置了
JRE代替JDK。



要改变它,请执行以下操作:

首选项> Java>已安装的JRE's >
Add ...对于'JRE Type'选择'Standard
VM'> Next> Directory:选择您的
JDK目录(在代替JRE)(在我的
的情况下:C:\程序
Files \Java\jdk1.6.0_16),按OK。



<现在,你回到'Installed
JRE's',在这里也选择JDK。



I seem to have an incorrectly specified JAVA_HOME variable. I can get around it for many things but now I am seem to be stuck. I am trying to use the Google App Engine and upload an application.

When I do so I get the error that the error:

cannot find javac executable based on java.home, tried "C:\Program Files\Java\jre6\bin\javac.exe" and "C:\Program Files\Java\bin\javac.exe"

I don't understand why it is looking there, doing echo %JAVA_HOME% gives me:

C:\Program Files\Java\jdk1.6.0_14

Which is where Java actually is. I am thinking my best hope might be to just put Java where it is looking for it - can you think of anything better.

解决方案

Looks like it's possibly a bug:

http://code.google.com/p/googleappengine/issues/detail?id=1226

There are lots of suggested workarounds/solutions, but comment #24 in the bug entry seems promising:

The problem is that GAE plugin for Eclipse is default configured with a JRE instead of a JDK.

To change this, do the following:

Preferences > Java > Installed JRE's > Add... For 'JRE Type' select 'Standard VM' > Next > Directory: select your JDK directory (instead of JRE) (in my case: C:\Program Files\Java\jdk1.6.0_16 ), press OK.

Now, you are back at 'Installed JRE's', select the JDK here also.

这篇关于JAVA_HOME指向错误的地方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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