Java EE SDK的问题 [英] Problems with Java EE SDK

查看:173
本文介绍了Java EE SDK的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要Java SDK的帮助。我安装了Java SE SDK,并且还安装了Java EE SDK。但是,Java EE SDK中的JAR在哪里? Java EE SDK不是Java SE SDK的超集吗?我需要两个吗?

I need help with Java SDKs. I have installed Java SE SDK, and I also installed Java EE SDK. However, where are the JARs in the Java EE SDK? Isn't Java EE SDK a superset of Java SE SDK? Do I need both?

我似乎没有成功设法在IntelliJ中添加所有库。

It doesn't seem that I successfully manages to add all libraries in IntelliJ.

推荐答案

Java EE是一个抽象 API。应用程序服务器(例如Glassfish,JBoss AS,Tomcat等)是具体的实现。 oracle.com上的Java EE下载链接包含Java EE API的具体参考实现,恰好是Glassfish。

Java EE is an abstract API. The application server (e.g. Glassfish, JBoss AS, Tomcat, etc) is the concrete implementation. The Java EE download link on oracle.com contains the concrete reference implementation of the Java EE API, which happens to be Glassfish.

为了针对Java EE API进行开发,您只需要在编译时类路径(大多数IDE中调用的构建路径)中引用应用程序服务器的库。我不确定IntelliJ,但是在Eclipse中,您需要做的就是将应用程序服务器运行时集成到IDE的服务器配置中,然后将Web项目与项目属性中的服务器运行时关联起来。

In order to develop against the Java EE API, you just need to reference the application server's libraries in the compile time classpath (the build path as it is called in most IDEs). I'm not sure about IntelliJ, but in Eclipse all you need to do is to integrate the application server runtime in the IDE's server configuration and then associate the web project with exactly that server runtime in the project's properties.

您不需要将它显式添加到JDK库中,甚至更多,它可能会在将来使事情变得更糟,因为在丢失可移植性和可能的​​主要类路径问题。另请参阅此相关(以Eclipse为目标)的问题:如何在我的Eclipse项目中导入javax.servlet API?

You do not need to explicitly add it to the JDK library, even more, it would possibly make things worse in the future as in losing portability and possible major classpath troubles. See also this related (Eclipse-targeted) question: How do I import the javax.servlet API in my Eclipse project?

这篇关于Java EE SDK的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆