aspose file tools*
The moose likes Beginning Java and the fly likes Which version ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Which version ?" Watch "Which version ?" New topic
Author

Which version ?

Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1197
Perhaps this is intermediate, but I'm posting here because I still feel like a beginner.
I have four Java development applications on my system. They are:
Java 2 Runtime Environment Standard Edition v1.3.1_17
Java 2 Runtime Environment, SE v1.4.2_10
Java 2 SDK Enterprise Edition v1.3.1
Java 2 SDK, SE v1.4.2_09
I just installed the 1.4.2_10 version of the J2RE so I could play the newer version of the Round-Up game, in hopes of one day taking the SCJP exam. I have both the 1.4.2_10 and the Enterprise Edition v1.3.1 in my classpath, so I don't want to delete anything that I need to make my Cattle Drive assignments work. My question is this:
Should I remove the SE v1.3.1_17 and the SDK, SE v1.4.2_09, or should I leave well enough alone?
Also, what exactly is the difference between the SDK and the JRE? I read the info on the download page, but the difference eludes me.
Chengwei Lee
Ranch Hand

Joined: Apr 02, 2004
Posts: 884
If you just want to be an end-user of Java applications, like applets, you only need the JRE. You would be interested with the SDK if you're a Java developer.

I would say there's no harm in keeping all your different versions of Java, although they do take up some disk space which may be valuable to you. The important thing is to set the JAVA_HOME to the version that you wishes to use to compile & execute your Java codes.


SCJP 1.4 * SCWCD 1.4 * SCBCD 1.3 * SCJA 1.0 * TOGAF 8
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
Originally posted by Carol Murphy:
My question is this:
Should I remove the SE v1.3.1_17 and the SDK, SE v1.4.2_09, or should I leave well enough alone?
Also, what exactly is the difference between the SDK and the JRE?


As Chengwei Lee said, it is not required to remove the old
Java 2 Runtime Environment Standard Edition v1.3.1_17
Java 2 Runtime Environment, SE v1.4.2_10
Java 2 SDK Enterprise Edition v1.3.1 (this one is totally different from the other three and is required for running servlets, JSPs, EJBs and other J2EE applications)

You need to be sure that your path contains the bin directory of the current j2sdk (in your case v1.4.2_09) or you won't be able to compile (javac) your applications properly. You can define the environment variable JAVA_HOME as the path to your current jdk/sdk and put %JAVA_HOME%/bin in your PATH environment variable if you would rather keep your PATH looking shorter. JAVA_HOME is useful because when you upgrade your sdk, you can just change it rather than adding to your PATH.

Also, I put the Java stuff at the beginning of my path, so it doesn't get confused with the MicroSoft version of "java".

The JRE is just for running Java applications and does not contain commands like "javac".
[ February 18, 2006: Message edited by: Marilyn de Queiroz ]

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1197
Okay, so the Runtime Environment I'm currently using is the 1.4.2_10, so I can delete the 1.3.1 version as disk space is important with my little old system, but I want to keep both types of the SDK for writing and compiling my stuff.
Thanks for clarifying that!
I'm at work, so I have to wait until I get home to check what I've got in my PATH and Classpath, but I seem to remember changing all of the 1.4.2_09 to 1.4.2_10, and I was able to compile and run the ShowShapes sample from the Code Barn last night, so I must have done that right.
My Classpath is really long and complicated-looking, so I'm sure I have a lot of stuff in there that I don't need, but I'm hesitant to change what is working.
Rusty Shackleford
Ranch Hand

Joined: Jan 03, 2006
Posts: 490
Minor point. You do not have to Java EE to compile and run JSP and servlets. At least not with Tomcat, SE works just fine with it. Another way to save on disk space.


"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
Originally posted by Rusty Shackleford:
You do not have to Java EE to compile and run JSP and servlets. At least not with Tomcat, SE works just fine with it.


I think that is because the necessary classes from the j2ee.jar have been unjarred and included in Tomcat's servlet.jar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Which version ?