• 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

JDK Version Problem

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I want to use JDK1.7 and JDK1.6 for different projects on my workstation. but when I install both JDK 1.7 supersedes and 1.6. I have set environment variables accordingly, but it doesn't seem to work.
Can you please help me to do it. I need to work on both projects at the same time one is using 1.6 and another 1.7.


Thank You.
 
Greenhorn
Posts: 9
Netbeans IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suppose you must be using some sort of IDE like eclipse of Netbeans or any IDE. All IDEs provide you the feature to choose the build compiler version.

For netbeans, Open Project Properties and do as is shown in the image :-



Here you can add different Platform for your project and choose to compile your project using that version of Java. Similar options you will find in eclipse and IntelliJ as well.


Hope that helps

Thank you,
Sincerely,
Psycho_Coder.
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For the command line/terminal, you can set the PATH for each run. I think on Windows® you use a command like
SET PATH=c:\Program Files\java\jdk1.6.0_99\bin;%PATH%
and for *nix
export PATH=/usr/java/jdk1.6.0_99/bin:$PATH
In the first example, because there are spaces in the text, you may need to put quote marks after = and before ;
I think that PATH is valid for that particular instance of the terminal/command line or until you change the PATH again.
 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic