Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

Please Answer Newbie Question

Thread view: 
aaronhirshberg@yahoo.com - 24 Oct 2005 01:32 GMT
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
aaronhirshberg@yahoo.com - 24 Oct 2005 01:35 GMT
Refer to this URL to see what I am talking about.

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

Aaron Hirshberg
Bjorn Abelli - 24 Oct 2005 02:23 GMT
<aaronhirshberg@yahoo.com> wrote...

> 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
aaronhirshberg@yahoo.com - 24 Oct 2005 15:25 GMT
> <aaronhirshberg@yahoo.com> wrote...
>
[quoted text clipped - 40 lines]
> 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
Roedy Green - 24 Oct 2005 03:29 GMT
> 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.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

zero - 24 Oct 2005 12:36 GMT
>> Or is there a separate package of class libs I can add to the
>>J2SE?
[quoted text clipped - 3 lines]
> 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.
aaronhirshberg@yahoo.com - 24 Oct 2005 15:26 GMT
All of you thanks for your advice.

Aaron Hirshberg
Roedy Green - 25 Oct 2005 06:00 GMT
On Mon, 24 Oct 2005 02:29:26 GMT, Roedy Green
<my_email_is_posted_on_my_website@munged.invalid> wrote, quoted or
indirectly quoted someone who said :

>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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.