How To Set Java Version

M

Mr. Steve Burrus

I would like/love to know just how exactly I go about seeing that my
version of Java which I am using says "jdk1.5.0" at the DOS command
prompt, and NOT, as it always seems to, the version 1.4.2* of it. I have
the env. variable JAVA_HOME set for the 1.5.0 version of it, and I even
went into my registry settings to try to get the version to say 1.5.0,
but no luck. Does anyone know how I should do this?
 
K

KC Wong

I would like/love to know just how exactly I go about seeing that my
version of Java which I am using says "jdk1.5.0" at the DOS command
prompt, and NOT, as it always seems to, the version 1.4.2* of it. I have
the env. variable JAVA_HOME set for the 1.5.0 version of it, and I even
went into my registry settings to try to get the version to say 1.5.0,
but no luck. Does anyone know how I should do this?

Have you checked your PATH variable? You could be still using java.exe and
javac.exe from an older installation.

You should use %JAVA_HOME%\bin in your PATH, so you only need to change
JAVA_HOME to switch to different versions.
 
R

Roedy Green

I would like/love to know just how exactly I go about seeing that my
version of Java which I am using says "jdk1.5.0" at the DOS command
prompt, and NOT, as it always seems to, the version 1.4.2* of it. I have
the env. variable JAVA_HOME set for the 1.5.0 version of it, and I even
went into my registry settings to try to get the version to say 1.5.0,
but no luck. Does anyone know how I should do this?

Sun has not got a decent method to let you have more than one Java
installed at once. The simplest answer is you reinstall the one you
want and it will use the most recently installed.

If you want to get fancier, see
http://mindprod.com/projects/jvmmanager.html


the other way out is to use explicit path reference to select the java
or javac.
 
T

Tor Iver Wilhelmsen

Mr. Steve Burrus said:
I would like/love to know just how exactly I go about seeing that my
version of Java which I am using says "jdk1.5.0" at the DOS command
prompt, and NOT, as it always seems to, the version 1.4.2* of it. I
have the env. variable JAVA_HOME set for the 1.5.0 version of it, and
I even went into my registry settings to try to get the version to say
1.5.0, but no luck. Does anyone know how I should do this?

JAVA_HOME isn't used by any modern applications. On Windows, there are
registry keys under HKLM\Software\Javasoft, in particular you will
want to look at a value there called CurrentVersion.

You will also want to modify your PATH.
 
C

Cristiano Sadun

I would like/love to know just how exactly I go about seeing that my
version of Java which I am using says "jdk1.5.0" at the DOS command
prompt, and NOT, as it always seems to, the version 1.4.2* of it. I have
the env. variable JAVA_HOME set for the 1.5.0 version of it, and I even
went into my registry settings to try to get the version to say 1.5.0,
but no luck. Does anyone know how I should do this?

They're different executables, located in different directories.

Try use the full pathname (and set up PATH as you like, as suggested)
 

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top