• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Change Java runtime version

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have installed two JDKs: 1.3.1 and 1.4, I need execute an application for the 1.3.1 version, but by default the 1.4 is that I have.
Where can i change the JDK by default?

I have set the following variables as you see (but nothing happens):
JAVA_HOME=C:\jdk1.3.1_01
PATH=C:\jdk1.3.1_01\bin;C:\jdk1.3.1_01\jre\lib
CLASSPATH=C:\jdk1.3.1_01\jre\lib

When I run the java -version option, the result is:
java version "1.4.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1
Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)

Someone can help me?
Thanks in advance
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you just want to use Java 1.3 for one process. You can create a .bat file and use the full dir path to the java.exe for 1.3 ex (C:\java\1.3.1\bin\java [program to run]);

This will keep your 1.4 open for all other things?

I hope this is what you are wanting. If you are changing the PATH are you doing it from the command line and using set PATH= or are you changing it from the My Computer->Properties->Environment Variables and change it there. If you do you need to reopen a new command window as a previous opened one will not except the changes.
 
Yaddif Medina
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I need change the runtime by default because I have several process that use the jdk 1.3.1 (as OC4J) but I need the jdk 1.4 for JBuilder that come with it.

More ideas?

Thanks.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This may be a long shot, but happened to me once

Try and search for java.exe in your windows folder and make
sure theres not a copy of the 1.4 version in there...
Also, double check that path variable since that is what
is responsible for you being able to call java.exe directly
in the first place and therefore should be the first place to look
for errors.
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are using windows, there is a register holding the default version.
hkey_local_machine/software/javasoft/java runtime environment/Current Version

You can change the value to any of the options you have available in your machine and it will be the default runtime environment.

At least is has worked for me in the past.
 
The fastest and most reliable components of any system are those that are not there. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic