简体   繁体   English

找不到Glassfish服务器JDK

[英]Glassfish server jdk not found

I am going to setup glassfish with eclipse. 我要设置带有日食的glassfish。 Glassfish server has installed with eclipse but now when i tried to run any jsp , it shows this error. Glassfish服务器已经安装了eclipse,但是现在当我尝试运行任何jsp时,它会显示此错误。

"GlassFish v3 requires a JDK 1.6 and not a JRE. Please add/select the correct JDK in the Server properties 'Runtime Environment' section." “ GlassFish v3需要JDK 1.6而不是JRE。请在服务器属性“运行时环境”部分中添加/选择正确的JDK。”

I searched alot and I have seen these 1 , 2 questions too but unable to find the solution. 我搜索了很多,也看到了这些1,2 问题,但找不到解决方案。 Please can anyone tell me that why this problem is occurring and its step by step solution? 请谁能告诉我为什么会出现此问题及其逐步解决方案?
Please keep in mind that i have installed java7 so is this due to java7 as it is asking for jdk1.6. 请记住,我已经安装了java7,这是由于java7所要求的jdk1.6。
I am thinking that it would be 1.6 or up versions. 我认为它将是1.6或更高版本。
thanks 谢谢

I have found the solution. 我找到了解决方案。 Actually the problem was that eclipse was not able to find the jdk as glassfish needs jdk to run files(not only jre). 实际上,问题在于eclipse无法找到jdk,因为glassfish需要jdk来运行文件(不仅是jre)。 So when i edited this then I am able to run successfully :). 因此,当我编辑此代码时,便能够成功运行:)。 This link helped me alot 这个链接帮了我很多

make sure the jdk is installed. 确保已安装jdk。 Look in C:\\Program Files\\Java\\jdk1.6.XXXX (mine says 0_16). 查看C:\\ Program Files \\ Java \\ jdk1.6.XXXX(我说0_16)。 If that has stuff in it the jdk probably was installed, if not you can grab just the jdk from http://java.sun.com/javase/downloads/index.jsp 如果其中包含jdk,则可能已安装,如果没有,您可以从http://java.sun.com/javase/downloads/index.jsp中获取jdk

This is where the error message kinda foobars ya. 这是错误消息有点foobars的地方。

Get eclipse started, ignore the message. 开始蚀,忽略消息。 Go to Window>Preferences Then under +Java+Installed JREs hit Add. 转到“窗口”>“首选项”,然后在“ + Java +已安装的JRE”下,单击“添加”。 Select Standard VM then Next 选择标准VM,然后选择下一步

JRE Home = C:\\Program Files\\Java\\jdk1.6.XXXX the rest should fill in automagically. JRE主页= C:\\ Program Files \\ Java \\ jdk1.6.XXXX,其余的应该自动填写。 Hit Finish. 点击完成。 MOST IMPORTANT! 最重要的! Click the check box back in the Preferences Window for the new jdk runtime...I don't know why it's necessary, but it definitely is... Still in Preference Window. 单击“首选项”窗口中新的jdk运行时的复选框...我不知道为什么需要这样做,但绝对是...仍然在“首选项”窗口中。 (May have to hit Okay, and re-open Preference window) (可能需要点击确定,然后重新打开“首选项”窗口)

Get to +Server, Runtime Environments Select the Glassfish SRE, hit Edit... From the JRE drop down grab the JDK and hit Finish Hit Okay. 转到+服务器,运行时环境选择Glassfish SRE,然后单击“编辑...”。从JRE下拉列表中抓住JDK,然后单击“完成”,然后单击“确定”。 Go to the Servers Veiw (probably down by the Console View). 转到“服务器视图”(可能在控制台视图下)。 Right click on the Bundled Glassfish...Server and hit restart/start 右键单击捆绑的Glassfish ...服务器,然后单击重新启动/启动

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM