简体   繁体   English

Eclipse如何区分“已安装的JRE”的JDK和JRE?

[英]How does Eclipse differentiate JDK and JRE for the “Installed JREs”?

I have a jdk1.8.0_92 installed, which is also added to the Java/Installed JREs in Eclipse Neon. 我安装了jdk1.8.0_92,它也已添加到Eclipse Neon中的Java /已安装JRE中。 The "bin" subfolder containing the java compiler and all other components of a standard JDK is there. 包含Java编译器和标准JDK的所有其他组件的“ bin”子文件夹在那里。 Still, when I try to assign this JRE as a "Server Runtime Environment" of a GlassFish server, Eclipse complains it needs a JDK and not a JRE. 但是,当我尝试将此JRE分配为GlassFish服务器的“服务器运行时环境”时,Eclipse抱怨它需要JDK而不是JRE。 An older jdk1.7.0_55 folder does not produce this problem, it is considered to be a JDK by Eclipse, and not a JRE. 较旧的jdk1.7.0_55文件夹不会产生此问题,Eclipse将其视为JDK,而不是JRE。 What may be missing from the 1.8 installation, by which Eclipse categorizes it as a JRE? Eclipse通过1.8安装将其归类为JRE可能会丢失什么? Image of the error message : 错误消息的图片:

在此处输入图片说明

Okey, check this 好的,检查一下

glassfish\\config\\asenv.bat GlassFish的\\ CONFIG \\ asenv.bat

where java path is configured 配置Java路径的位置

REM set AS_JAVA=C:\\Program Files\\Java\\jdk1.8.0_92\\jre/.. set AS_JAVA=C:\\Program Files\\Java\\jdk1.8.0_92 REM设置AS_JAVA = C:\\ Program Files \\ Java \\ jdk1.8.0_92 \\ jre / ..设置AS_JAVA = C:\\ Program Files \\ Java \\ jdk1.8.0_92

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

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