Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have multiple versions of java installed on my machine (5,6,7). I downloaded a project which requires jdk6 to compile. Is there a way to 'set' jdk6 to be the default one in that particular directory?

Modifying the makefiles is out of question - way too complex)

share|improve this question

You can change the system wide default jdk, compile and then reveryt back to the one you were using before.

# update-alternatives --config java              # Select java-1.6.0-oracle
# update-java-alternatives --set java-1.6.0-oracle
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.