Forums Register Login

Installing J2EE problem

+Pie Number of slices to send: Send
Hello,

Please forgive me if this is a really basic question, but I am confused - I studied Java a few years ago, understand all the syntax and concepts, but I never worked on the EE side before, and now I want to study this.

I want to install Java 7 SE and Java 7 EE.

Now I can go to Oracle's site and download a Java 7 SDK, and install it, which I have already done in my Windows 8.1 machine.

Where I am confused is how to install the J2EE bit.

My understanding is that J2EE contains additional packages like jsps and servlets, and when you install Java SE, these aren't installed as they're part of EE and not SE. Is this correct? So I went to Oracle's site, and downloaded java_ee_sdk_7u1. But unlike SE, this doesn't have an executable to run. it just contains a directory called glassfish, and I cannot see any jars that might contain the J2EE APIs like servlets.

I would appreciate some assistance.

Thanks!
1
+Pie Number of slices to send: Send
Welcome to the Ranch

You should find all the downloads here; there are installation instructions links against each download button. I notice there is also a tutorial if you scroll down; you might do well to download that too. You must install JavaSE first.
1
+Pie Number of slices to send: Send
When you use Java EE, you create components such as servlets, JSPs (Java Server Pages) and EJBs (Enterprise Java Beans) that are not standalone programs. They are components that you deploy in a Java EE application server - a server program that provides things like an HTTP server, etc. and that can delegate HTTP requests to your servlets, and many other kinds of services.

Java EE defines all the types of components, and defines what services a Java EE application server should provide.

Glassfish is the Java EE application server reference implementation - it is the official Java EE application server example. Other companies have also implemented the Java EE standards and have their own Java EE app server implementation. There are a number of commercial Java EE app servers, such as Oracle WebLogic and IBM WebSphere, and there are free and open source app servers such as WildFly (formerly known as JBoss).

Oracle's Java EE SDK includes the Glassfish Java EE application server.

The Glassfish directory somewhere contains the JAR files with the servlet API and other Java EE APIs.

Oracle has an extensive Java EE tutorial.
1
+Pie Number of slices to send: Send
What that means in relation to your IDE (I'm assuming you are using an IDE) and the glassfish directory is that you need to point your IDE to this directory when configuring the server in the IDE settings. Then, when you run the application, oula (fingers crossed).
+Pie Number of slices to send: Send
Thanks all - so it seems to me that the J2EE classes are bundled into a J2EE application server, and that we don't really need to download them directly i.e. if we download Weblogic, then that will contain the J2EE classes already.

Yes, I will use Eclipse, I am actually getting started on J2EE by watching some webinars, the one I am watching uses Apache Tomcat, I would like to use Weblogic developer version. My question now is that Weblogic 10.3 seems to come bundled with the Java 6 EE classes, so I am assuming that I will need to use Java 6 SE?

Thanks.
1
+Pie Number of slices to send: Send
This confused me when I first started looking into EE. The Java platform is modular, so you layer one component on top of another, so you can use all features in the lower parts of the stack. You should be able to specify which version of the JDK you want to use. The JEE stack sits on top of the JDK, therefore you can use the features of the JDK independent to EE facets when writing your program. For example, it is possible to use Lambda expressions (which are new to JSE8) within a Session Bean running on a JEE7 Application Server.
1
+Pie Number of slices to send: Send
You will need to use the version of Java and JEE that your application server supports. Why would you use something creaky like Weblogic rather than something more modern like Tomcat or Glassfish?
1
+Pie Number of slices to send: Send
I thought you could use 8 and 7 together irrespective. Clearly that is not necessarily the case.
1
+Pie Number of slices to send: Send
I'm not sure what you mean by that.
2
+Pie Number of slices to send: Send
One thing that can be confusing is that you don't actually need to download and install "J2EE" or "Java EE".

Everything you need you can usually find in whatever appserver you are working with. So, for example, when I use Eclipse to develop webapps for Tomcat, I add the TOMCAT_HOME/lib/servlet-api.jar and jsp-api.jar files to my project's compile path (DO NOT include the jar into the WAR you are building!). Too avoid making my projects tied to my specific filesystem, I use the Eclipse "symbolic variable" mapping feature that allows me to tell Eclipse itself where those JARs are and only reference them by a (portable) symbolc name in my projects.

This is also true for other webapp servers such as WebLogic.
+Pie Number of slices to send: Send
Thanks, a lot of useful answers. The reason I want to use Weblogic and not Tomcat is we use Weblogic at work, and so I want to get some hands-on admin practise of that too.

Ok, so it seems that we should use the same SE version as the EE version. So now my question is this, Weblogic 10.3 says: This version of WLS requires JDK 1.6. For Mac use 1.6.0_20 latest update. Ensure that you have the proper JDK version installed.

But on the Oracle website, they say we strongly recommend you to not use an older SDK because of security risks. This confuses me - say some enterprise has Weblogic 10.3 running and they haven't upgraded, they must be using Java 1.6, if Oracle isn't updating the older versions with the latest security patches, then these enterprises are at risk, yes? Does this mean enterprises are forced to upgrade their Java application servers constantly?

Thanks.

1
+Pie Number of slices to send: Send
 

John Smithonian wrote:Ok, so it seems that we should use the same SE version as the EE version.


The version numbers of Java SE and EE are independent, and don't align. So, if you are using Java SE 7, it does not mean you need Java EE 7. Look at the specs of your version of your app server which Java SE version is required and which version of the Java EE specification it supports.

WebLogic version 10.3 is already old (from 2008, according to Wikipedia). In the Wikipedia article there's also a table that shows what versions of WebLogic support what versions of Java SE and EE. For WebLogic 10.3 is says Java SE 6 and Java EE 5.

John Smithonian wrote:This confuses me - say some enterprise has Weblogic 10.3 running and they haven't upgraded, they must be using Java 1.6, if Oracle isn't updating the older versions with the latest security patches, then these enterprises are at risk, yes? Does this mean enterprises are forced to upgrade their Java application servers constantly?


Normally, new Java versions are compatible with older versions, and software written for Java 6 should run without any problems on Java 7 or 8. But there can always be small incompatibilities, so they won't promise you that WebLogic 10.3 works correctly on Java 7 or 8.

Enterprises normally don't upgrade all their systems immediately whenever a new version of some piece of software is released. Testing your software with the new version, upgrading servers, having employees learn a new version etc. all takes time and money and involves risk, so enterprises normally only do that when they have a business case to do so. You are seeing this in your own company, which is currently using versions of Java and WebLogic that are two versions behind the latest.
+Pie Number of slices to send: Send
Great, many thanks - I more or less have the answer to my question now.
+Pie Number of slices to send: Send
Tell us when it is actually working
Roses are red, violets are blue. Some poems rhyme and some don't. And some poems are a tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1049 times.
Similar Threads
Upgrading from Java SE to Java EE
Error: Could not find the required version of the Java(TM) 2 Runtime Environment in '(null)'
WebSockets with Servlets
Java EE 6 Profile and Glassfish confusion
Installing Java EE 6 on Ubuntu/linux
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:32:50.