Please Answer Newbie Question

A

aaronhirshberg

I have J2SE 5 installed on my PC and am using it. I went to install
J2EE, but the "bundle" at the sun website included J2SE 5 and a web
server and some documentation. So that implies that the J2SE JDK has
servlet and JSP class files in the class libs already on my PC. But I
get compile errors related to these classes not being found. So I
should just uninstall the J2SE 5 and install the J2EE and get it over
with? Or is there a separate package of class libs I can add to the
J2SE?

Aaron Hirshberg
 
B

Bjorn Abelli

I have J2SE 5 installed on my PC and am using it.
I went to install J2EE, but the "bundle" at the sun
website included J2SE 5 and a web server and some
documentation.

If you don't want all of it, just choose another bundle!

On the right side of page

http://java.sun.com/j2ee/1.4/download.html

....the packages you mentioned can be downloaded separately.
So that implies that the J2SE JDK has
servlet and JSP class files in the class libs already
on my PC.

Why would you come to that conclusion?

Servlet and JSP classes are not in the J2SE, they're in the J2EE.

The reason to why they "offer" you to download a "full" download, including
J2SE, is simply because J2EE is built on top of J2SE, and needs it to work.
That's often the case when you want to install the application from scratch
on a different machine.
But I get compile errors related to these classes
not being found. So I should just uninstall the
J2SE 5 and install the J2EE and get it over with?

You could do that... ;-)

Or..
Or is there a separate package of class libs I can
add to the J2SE?

As I said, look on the right side of the download page. There you'll find
the application server as a separate download.

However, you're not telling what you're using it for, other than implying
that you're going to develop servlets and JSP.

If you're doing it just to learn how to make servlets and JSP, and using a
tutorial that examplifies with the Sun implementation, then that could be
the safest way to go ahead.

But there are other implementations of servers able to run Servlets and JSP,
than the application server from Sun. If you intend to use any of those, you
don't need the full kit from Sun. Just install *that* server, and use the
libraries provided with it. In most cases they use "scaled down" versions of
the libraries which are often more easy to handle.

// Bjorn A
 
R

Roedy Green

Or is there a separate package of class libs I can add to the
J2SE?

I have never found sun capable of properly dealing with the problem
of having more than one version of its code installed. If the J2EE
contains a JRE/JDK uninstall any you have, and install the J2EE
bundle.
 
Z

zero

I have never found sun capable of properly dealing with the problem
of having more than one version of its code installed. If the J2EE
contains a JRE/JDK uninstall any you have, and install the J2EE
bundle.

Having more than one JDK installed is a pain, but it's possible. There are
two options:

1) if you only want to install the latest version, then just install it on
top of the others. However, this wastes disk space since the old versions
are still installed but not used.

2) if you want to be able to use several versions, you will need to install
the latest version first, followed by any previous versions you want to
use. You may then explicitly have to correct system variables to point to
the earliest version, and call newer versions with their full path name.

I've used this scheme to update parts of old software without losing the
possibility to write new programs. Unless you really need this I agree
with Roedy's assessment though: just uninstall and reinstall the J2EE, or
else just install the parts you need.
 
A

aaronhirshberg

Bjorn said:
If you don't want all of it, just choose another bundle!

On the right side of page

http://java.sun.com/j2ee/1.4/download.html

...the packages you mentioned can be downloaded separately.


Why would you come to that conclusion?

Servlet and JSP classes are not in the J2SE, they're in the J2EE.

The reason to why they "offer" you to download a "full" download, including
J2SE, is simply because J2EE is built on top of J2SE, and needs it to work.
That's often the case when you want to install the application from scratch
on a different machine.


You could do that... ;-)

Or..


As I said, look on the right side of the download page. There you'll find
the application server as a separate download.

However, you're not telling what you're using it for, other than implying
that you're going to develop servlets and JSP.

Yes. I am working out the exercises in some Java books.
If you're doing it just to learn how to make servlets and JSP, and using a
tutorial that examplifies with the Sun implementation, then that could be
the safest way to go ahead.

The tutorial uses Tomcat. Which I have already installed. So I will
look for those libraries in the Tomcat installation, and modify my env
vars accordingly, or write a *.bat file to compile that brings in the
libs in the Tomcat installation.
But there are other implementations of servers able to run Servlets and JSP,
than the application server from Sun. If you intend to use any of those, you
don't need the full kit from Sun. Just install *that* server, and use the
libraries provided with it. In most cases they use "scaled down" versions of
the libraries which are often more easy to handle.

Or I will do as the other person suggested and download the Sun server
stuff and find the libs in there.

Aaron
 
R

Roedy Green

I have never found sun capable of properly dealing with the problem
of having more than one version of its code installed. If the J2EE
contains a JRE/JDK uninstall any you have, and install the J2EE
bundle.

The other advice of using the J2EE bundle without the JDK will of
course result in a shorter download, with marginally increased
possibility the existing JDK won't integrate in as easily without some
tiny shoehorn trick.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top