问题
I am just starting with the Oracle Java EE 7 tutorial. While I have already gained some practice with an existing Apache Tomcat Environment I wanted to get in touch with the complete tutorial to have a clear learning path and trail.
So I am currently using a Mac with OS X Mavericks. I have already installed an Oracle JDK 1.7 which is working pretty smooth. Developing is also nice so no problems with that.
Now I came to the part in order to download "Java EE 7 SDK/JDK" (http://docs.oracle.com/javaee/7/tutorial/doc/usingexamples001.htm#GEXAJ)
I have done so and run the installer. What I can see it does is installing a glassfish4 environment (which seems to be fine as the tutorial covers glassfish and I would use it in tutorial). I also ran the Update Tool to get the java-ee-7-tutorial-examples.
Anyhow adding the glassfish server to netbeans 8 I mentioned in the "Java" Tab there is just JDK 1.7 which points to me 1.7 Java JDK location on the system.
Trying to find any specific EE 7 location nothing seems to be the right location (find / -name java
)
So what exactly does this installation do in other words than just installing glassfish environment? And what is the use case of having the EE 7 SDK/JDK ? Maybe I am a bit confused but I want to have these things clear for myself in order to understand it.
回答1:
GlassFish Server Open Source Edition 4 is the reference implementation of the Java EE 7 specification. So you can never download Java EE itself like you do with Java SE by downloading the JDK, but you always download an application server implementing it.
At the moment, you have JBoss WildFly 8 as alternative, but it usually takes some time after more, especially commercial application servers like Oracle's WebLogic follow.
So concerning your IDE, you add the JDK as runtime as in every other java project and GlassFish as a server and target for your deployment.
Hint: In case you experience problems when trying to get the samples via updatetool (at least it was the case when I did the Java EE 7 tutorial), just try again - java.net is so awfully slow sometimes.
来源:https://stackoverflow.com/questions/24438925/confusion-after-installation-of-jdk-1-7-and-java-ee-7-sdk