Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

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.