File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Installing JDK

 
Jim Patrick
Ranch Hand
Posts: 42
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

could we install two different versions of JDK(eg: JDK 1.4 and JDK 5.0) in different directories under c: in WINXP ?

if yes, then which JDK(JDK 1.4 or JDK 5.0) to install first and how to set classpath and path in environment variables?

Rgds,
Jim.
[ March 08, 2008: Message edited by: Jim Patrick ]
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Install them both in their default folders, on Windows maybe
  • c:\Program Files\Java\jdk1.4.2_12
  • c:\Program Files\java\jdk1.6.0_04
  • Set up the PATH to point to one of them, usually the most recent.
    You can set up the PATH from a command prompt, but I can't remember how to do it. There is more about PATHs here. If you want to use the 1.4.2 you would have to prepend c:\Program Files\Java\jdk1.4.2_12\bin\ to the java, javac etc. commands. You might need to put quotes around it if the line contains whitespace like thisTry that and see how you get on with it.
     
    Campbell Ritchie
    Sheriff
    Pie
    Posts: 47293
    52
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Have you had any luck?
    I said you can alter the PATH from the command prompt, but that might only be possible from a terminal window on Linux/Unix. You would write
    export PATH=/usr/java/jdk1.4.0_12/bin/:$PATH (or similar)
    in Linux and it would change the PATH until you close that terminal, but I haven't found how to do it on Windows. Sorry.
     
    Jim Patrick
    Ranch Hand
    Posts: 42
    Java
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    anyways, Ritchie, thanks a lot for the reply..


    Originally posted by Campbell Ritchie:
    Have you had any luck?
    I said you can alter the PATH from the command prompt, but that might only be possible from a terminal window on Linux/Unix. You would write
    export PATH=/usr/java/jdk1.4.0_12/bin/:$PATH (or similar)
    in Linux and it would change the PATH until you close that terminal, but I haven't found how to do it on Windows. Sorry.
     
    Christophe Verré
    Sheriff
    Pie
    Posts: 14691
    16
    Eclipse IDE Ubuntu VI Editor
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I have different version of the JDK on my machine. I use BAT files to set the proper PATH and JAVA_HOME.
    For example, here is one :

    And here is another :
     
    camilo lopes
    Ranch Hand
    Posts: 202
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    only The directories are differents! the o local is default.
     
    Campbell Ritchie
    Sheriff
    Pie
    Posts: 47293
    52
    • 0
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I thought there was a way to do it on Windows. I had forgotten about .bat files. Thank you.
     
    I agree. Here's the link: http://aspose.com/file-tools
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic