简体   繁体   English

如何在Eclipse Neon 2中添加GlassFish 4.1服务器?

[英]How can I add GlassFish 4.1 server in Eclipse Neon 2?

I have a fresh installation of Eclipse IDE for Java EE Developers - for WIndows 64bit - Version: Neon.2 Release (4.6.2) 我有一个全新的Eclipse IDE for Java EE Developers安装 - 适用于WIndows 64bit - 版本:Neon.2发行版(4.6.2)

I have downloaded the newest editions of GlassFish server 4.1.1 - both Full & Web Profie 我已经下载了最新版本的GlassFish服务器4.1.1 - Full和Web Profie

I've installed the latest GlassFish tolls using Eclipse Marketplace: 我使用Eclipse Marketplace安装了最新的GlassFish通行证:
https://marketplace.eclipse.org/content/glassfish-tools https://marketplace.eclipse.org/content/glassfish-tools


Now I am trying to add GlassFish Server to Eclipse using the latest JDK 8, but it complains that Java 6 or 7 is required: 现在我尝试使用最新的JDK 8将GlassFish Server添加到Eclipse,但它抱怨需要Java 6或7:

在此输入图像描述


OK, then I am trying to use the latest JDK 7 instead of 8, but this time it complains that this is an invalid GlassFish instalation. 好的,那我试图使用最新的JDK 7而不是8,但这次它抱怨这是一个无效的GlassFish安装。

在此输入图像描述


How can I add GlassFish server to Eclipse, what am I doing wrong ? 如何将GlassFish服务器添加到Eclipse中,我做错了什么?

After lots of trials and errors I finally managed this issue. 经过大量的试验和错误,我终于解决了这个问题。
A glassfish subdirectory must be pointed instead of base installation directory, and everything works fine. 必须指向glassfish子目录而不是基本安装目录,一切正常。

在此输入图像描述

As for the "Java 6 or 7 is required"-problem; 至于“Java 6或7是必需的” - 问题; I managed to get past this by adding a trailing slash to the java location. 我设法通过向java位置添加尾部斜杠来克服这个问题。

/usr/lib/jvm/java-8-oracle  # "Java 6 or 7 is required"
/usr/lib/jvm/java-8-oracle/ # Works

This is on linux, so it might not apply to your windows environment. 这是在linux上,因此它可能不适用于您的Windows环境。

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

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