Glassfish 服务器适配器未显示在 Eclipse 的列表中

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24758298/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 22:07:14  来源:igfitidea点击:

Glassfish server adapter not shown in list in Eclipse

eclipseglassfish

提问by kolobok

I successfully installed Glassfish Tools for Kepler. However besides Apache, Basic, JBoss and ObjectWeb I do not see an entry for GlassFish in server wizard (File->New->Other->Server).

我成功地为 Kepler 安装了 Glassfish 工具。但是,除了 Apache、Basic、JBoss 和 ObjectWeb 之外,我在服务器向导中没有看到 GlassFish 的条目(File->New->Other->Server)

I tried to install Glassfish Tools both from Eclipse Marketplace and from server wizard's "Download additional server adapters".

我尝试从 Eclipse Marketplace 和服务器向导的“下载其他服务器适配器”中安装 Glassfish 工具。

Glassfish Tools plugin is installed Glassfish Tools plugin is installed

Glassfish 工具插件已安装 Glassfish 工具插件已安装

Not shown in server type list Not shown in server type list

未显示在服务器类型列表中 未显示在服务器类型列表中

jre is fine ($JAVA_HOME set to the default value) jre is fine ($JAVA_HOME set to the default value)

jre 很好($JAVA_HOME 设置为默认值) jre 很好($JAVA_HOME 设置为默认值)

Similar questions didn't help: Glassfish adapter in Eclipse Juno missing

类似的问题没有帮助: Eclipse Juno 中的 Glassfish 适配器丢失

采纳答案by kolobok

I tried to install several components from Oracle Enterprise Pack for Eclipse Kepler (no matter which, because I deleted all of them afterwards!) http://marketplace.eclipse.org/content/oracle-enterprise-pack-eclipse-kepler#.U8Ul03WSy00

我尝试从 Oracle Enterprise Pack for Eclipse Kepler 安装几个组件(无论哪个,因为我之后都删除了它们!)http://marketplace.eclipse.org/content/oracle-enterprise-pack-eclipse-kepler#。 U8Ul03WSy00

After installing, the dialog with warning "Oracle Enterprise Pack for Eclipse requires Java 7 or higher. Continue to configure a compatible Java VM." appeared. I specified path to jdk (same as in picture above, same as my $JAVA_HOME) and restarted Eclipse. After this everything works.

安装后,出现警告对话框“Oracle Enterprise Pack for Eclipse 需要 Java 7 或更高版本。继续配置兼容的 Java VM。” 出现了。我指定了 jdk 的路径(与上图相同,与我的 $JAVA_HOME 相同)并重新启动 Eclipse。在此之后一切正常。

UPDATED.As I found out, the key is in eclipse.inifile. If this file starts from

更新。正如我发现的那样,密钥在eclipse.ini文件中。如果这个文件从

-vm
/usr/local/jdk1.7.0_40/bin

(well, depending on your jdk path) Glassfish is shown in server adapter list. If not - Glassfish is not shown.

(好吧,取决于您的 jdk 路径) Glassfish 显示在服务器适配器列表中。如果没有 - 不显示 Glassfish。

回答by Steve McGarrett

For those who are still having trouble getting this to work, it seems like the GlassFish plugin started to require Java JDK 8for Luna at some point.

对于那些仍然无法使用它的人来说,GlassFish 插件似乎在某个时候开始需要Java JDK 8for Luna。

Yesterday I had GlassFish running in Eclipse Luna on JDK 7. Today I reinstalled Eclipse and the GlassFish Tools via Marketplace but the GlassFish Server did not show up in the "Define a new Server" view, although JDK 7 was selected as default VM. After I installed JDK 8 and made it my default VM, everything worked just fine.

昨天我在 JDK 7 上的 Eclipse Luna 中运行了 GlassFish。今天我通过 Marketplace 重新安装了 Eclipse 和 GlassFish 工具,但是 GlassFish Server 没有出现在“定义新服务器”视图中,尽管 JDK 7 被选为默认 VM。在我安装 JDK 8 并将其设为我的默认 VM 后,一切正常。

Edit: I found this on the official Glassfish Marketplace confirming my assumption. The Glassfish Plugin for Eclipse now requires JDK 8 for Eclipse Mars and Luna (Kepler only requires JDK 7): http://marketplace.eclipse.org/content/glassfish-tools

编辑:我在官方 Glassfish 市场上发现了这个,证实了我的假设。Eclipse 的 Glassfish 插件现在需要 Eclipse Mars 和 Luna 的 JDK 8(Kepler 仅需要 JDK 7):http: //marketplace.eclipse.org/content/glassfish-tools

回答by MaxRelax

This was a tricky one. On a windows machine/laptop, just add these two lines to your eclipse.ini. see a copy of an eclipse.ini below
-vm
C:\Program Files\Java\jdk1.7.0_67\bin

这是一个棘手的问题。在 Windows 机器/笔记本电脑上,只需将这两行添加到您的 eclipse.ini 中。在
-vm
C:\Program Files\Java\jdk1.7.0_67\bin下查看 eclipse.ini 的副本

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835
-showsplash
org.eclipse.platform_4.3.1.v20130911-1000
-vm
C:\Program Files\Java\jdk1.7.0_67\bin
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-install
C:\Eclipse\EclipseEE431
-vmargs
-Xms40m
-Xmx384m

-startup
插件/ org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
插件/ org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20130807-1835
-showsplash
org.eclipse .platform_4.3.1.v20130911-1000
-vm
C:\Program Files\Java\jdk1.7.0_67\bin
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-install
C:\Eclipse\EclipseEE431
- vmargs
-Xms40m
-Xmx384m

回答by Emrah Denizer

In my case I solved this issue by using Eclipse Marketplace.Type "glassfish" in the search box then install it.That's all.

在我的例子中,我通过使用 Eclipse Marketplace 解决了这个问题。在搜索框中输入“glassfish”然后安装它。就是这样。

回答by Ayaz Uddin

in Eclipse market place search for glassfish server adapter for eclipse mars. there is link to install in one of the hyperlink.

在 Eclipse 市场中搜索用于 Eclipse mars 的 glassfish 服务器适配器。在其中一个超链接中有安装链接。