GlassFish Server 是否需要 JDK 或 JRE 才能运行 Java EE 应用程序?

GlassFish Server 是否需要 JDK 或 JRE 才能运行 Java EE 应用程序?

我想在没有 GUI 的计算机上安装 GlassFish Server。我想知道是否需要 JDK 或 JRE 才能运行 Java Platform, Enterprise Edition (Java EE) 应用程序?

答案1

由于 GlassFish 是 AS (应用服务器),因此该问题的答案似乎与以下接受的答案相当:此问答

这取决于 WAR 的内容。如果 WAR 包含 JSP,则需要 JDK。否则,安装 JRE 就足够了。

然而,实际答案根据此文档是 GlassFish 需要 JDK,因为 Java EE 使用了一些 Java 标准版 (SE) 功能。

Make sure JDK 7 is installed.

Java EE 7 requires JDK 7 as it make use of some of the latest Java SE 7 features (e.g. JMS 2 uses Java 7 auto-closeable interfaces).
To check if you have JDK 7 installed (full JDK, not just JRE), type javac -version in a shell/command box.

相关内容