tags:

views:

370

answers:

5

Hi,

I'm looking for the JDK source code for Java 1.5 update 18 (on win XP). I don't want to install a JDK, I don't want the source code for the entire VM, just the source for the JDK libs, so that when I navigate to a Java class in Eclipse, it opens up the source code.

Is it possible to download just src.zip (or a zip that contains src.zip)? I don't want to install a new JDK/JRE just to get access to src.zip as I'm concerned that this will have undesirable side-effects such as modifying JAVA_HOME.

Thanks, Don

A: 

http://download.java.net/jdk6/source/

Is that what you want?

Acron
No, I want the source for Java 1.5 update 18
Don
+1  A: 

Below is the source for the latest JDK 1.5 but it seems difficult to find update 18 specifically, at least there is no obvious link :-(
http://java.sun.com/j2se/jrl_download.html

Nicolas Raoul
+1  A: 

Only place I know of that you can get them is with the JDK. You can grab it here Installing it shouldn't modify JAVA_HOME

objects
+3  A: 

The best place to go to get old versions of Java stuff is the Archive page. JDK 1.5.0_18 is there.

However, I don't think it is possible to download just the source code ZIP file. But hey, you could always get a friend to download the relevant JDK and copy it onto a CD/DVD for you.

EDIT re your concern about environment variables being changed.

Installing a JDK does not modify the JAVA_HOME environment variable or any other environment variable. Indeed, the JDK / JRE installation instructions explain that you need to update JAVA_HOME and PATH manually.

Sun have always been careful to allow you to install multiple JDK/JREs side-by-side. The only thing of that nature that gets changed by the installer is the version of Java used by your browser's Java plugin. And that only changes if you give the installer permission to change it!!

Stephen C
A: 

Download the JDK for the release you want to use, and install it.

Then start Eclipse and go to Window -> Preferences -> Java -> Installed JREs, and Add the JDK you just installed, and ensure it has the checkmark!

That should do it (and it doesn't mess with the default java versions and JAVA_HOME and all)

Thorbjørn Ravn Andersen