GlassFish 4 和 Eclipse Juno JavaEE 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18155801/
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
Error with GlassFish 4 and Eclipse Juno JavaEE
提问by PM 77-1
I downloaded Eclipse Juno
a while ago but until now used its Java SE perspective only.
我Eclipse Juno
不久前下载了但直到现在只使用它的 Java SE 透视图。
Today I downloaded GlassFish 4
for Windows and installed it. During installation I got a screen that showed that installation process didn't find Java JDK but allowed to browse for it. I found C:\Program Files\Java\jdk1.7.0_17
directory and selected it. i finished the installation and was able to start and stop domain and see both application and admin pages.
今天我下载GlassFish 4
了 Windows 版并安装了它。在安装过程中,我看到一个屏幕,显示安装过程没有找到 Java JDK,但允许浏览它。我找到了C:\Program Files\Java\jdk1.7.0_17
目录并选择了它。我完成了安装并且能够启动和停止域并查看应用程序和管理页面。
I also wanted to install GlassFish plug-in for Eclipse
. I found it through Marketplace and downloaded and installed it.
我也想安装GlassFish plug-in for Eclipse
. 我通过 Marketplace 找到并下载并安装了它。
I switched Eclipse's perspective to JavaEE and tried to pick GlassFish as a server. Such option was indeed there. However, I then got a screen titled New GlassFish 4.0 Runtimewith the following error:
我将 Eclipse 的视角切换到 JavaEE 并尝试选择 GlassFish 作为服务器。这样的选择确实存在。但是,我随后看到了一个名为New GlassFish 4.0 Runtime的屏幕,并出现以下错误:
Glassfish server runtime requires full JDK instead of JRE
Glassfish 服务器运行时需要完整的 JDK 而不是 JRE
The only enabled buttons are Backand Cancel.
唯一启用的按钮是Back和Cancel。
I Googled around but didn't find anything useful for such case.
我在谷歌上搜索,但没有发现任何对这种情况有用的东西。
Can somebody guess what could have happened and suggest troubleshooting steps?
有人可以猜测可能发生了什么并建议故障排除步骤吗?
回答by iarroyo
1) make sure the jdk is installed. Look in C:\Program Files\Java\jdk1.7.XXXX
1)确保安装了jdk。在看 C:\Program Files\Java\jdk1.7.XXXX
2) Go to Window > Preferences
. Then under +Java+Installed JREs
hit Add.
2) 前往Window > Preferences
。然后下+Java+Installed JREs
击Add.
- Select
'Standard VM'
then Next JRE Home = C:\Program Files\Java\jdk1.7.XXXX
- the rest should fill in automagically.
- 选择
'Standard VM'
然后下一步 JRE Home = C:\Program Files\Java\jdk1.7.XXXX
- 其余的应该自动填写。
3) Still in Preference Window
-
3) 还在Preference Window
——
- Get to
+Server, Runtime Environments
- Select add an chose
glassfish 4
(for example) - In JRE choose the new jdk added in step 2.
- In glassfish server directory choose the path where you have setup glassfish, in my case is:
D:\glassfish4\glassfish
- Select add an chose
- 到达
+Server, Runtime Environments
- 选择添加一个选择
glassfish 4
(例如) - 在 JRE 中选择在步骤 2 中添加的新 jdk。
- 在 glassfish 服务器目录中,选择您设置 glassfish 的路径,在我的情况下是:
D:\glassfish4\glassfish
- 选择添加一个选择
4) Restart eclipse.
4)重新启动日食。
回答by Konstantin Komissarchik
On the screen where you define GlassFish runtime, there is a link labeled "Installed JRE preferences". If you click on that you will be directed to a screen that shows you all JRE and JDK installations that Eclipse knows about. You will need to add an entry for your JDK install. Then, when you return to the GF screen, select that new entry in the JRE drop-down list.
在定义 GlassFish 运行时的屏幕上,有一个标记为“已安装的 JRE 首选项”的链接。如果单击它,您将被定向到一个屏幕,该屏幕显示 Eclipse 知道的所有 JRE 和 JDK 安装。您需要为 JDK 安装添加一个条目。然后,当您返回 GF 屏幕时,在 JRE 下拉列表中选择该新条目。
回答by Joshnee
I also faced the same issue. Link "Installed JRE preferences" was not available.
我也面临同样的问题。链接“已安装的 JRE 首选项”不可用。
Click on 'Manage Eclipse Java Runtimes'
Add your jdk version, you can also search for your jdk installation with 'search' button. If jdk is not installed, you need to install it first.
单击“管理 Eclipse Java 运行时”
添加您的 jdk 版本,您也可以使用“搜索”按钮搜索您的 jdk 安装。如果没有安装jdk,需要先安装。