Results 1 to 3 of 3
  1. #1
    luke_devon is offline Member
    Join Date
    Jul 2010
    Posts
    7
    Rep Power
    0

    Default Multiple Java in a single BOX

    Hi

    I have installed and configure JAVA 1.6 in my windows machine. class path and java home configured for the same version. So i can compile a java code from any where in the machine.

    But now I wanted install java 1.5 also in the same machine. How can i use java 1.5 with different applications ? How to give the classpath and other variable ?

    can we use a command in the command prompt ?

    Please help me ? i need to execute a jar file .

    Thanks
    Luke

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

    Default

    usually I do this by creating a batch file to set the JAVA_HOME environment variable, and then invoke Java by specifying the %JAVA_HOME%\bin\java

    Java Code:
    set JAVA_HOME=c:\jdk1.5
    
    %JAVA_HOME%\bin\java -jar myjarfile.jar
    Where different .bat files can use different java homes.

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,272
    Rep Power
    25

    Default

    How can i use java 1.5 with different applications
    On windows, you can create shortcuts with different command lines that set the path to the command you want to use.
    Also you can add your own commandlines to the Right-click context menu for jar files.

Similar Threads

  1. Single Tomcat Multiple Developers
    By Quentinb in forum Eclipse
    Replies: 3
    Last Post: 06-14-2010, 01:40 PM
  2. Replies: 5
    Last Post: 11-09-2009, 06:12 PM
  3. Replies: 3
    Last Post: 10-12-2009, 02:03 PM
  4. multiple users with single connection
    By nishi.kishore in forum Java Servlet
    Replies: 3
    Last Post: 09-06-2009, 03:15 PM
  5. Replies: 6
    Last Post: 07-28-2008, 06:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •