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 just started at a new shop and I have users that need Java 1.5_11 and 1.7.0_04 installed. When a Java app starts up, they get prompted as to which version to use. What are the steps to set that up?

Thank you

share|improve this question
3  
What are the steps to set what up? By your question they get prompted and this sounds like what they want/need. Please edit your question to be more clear about what you are asking –  Mokubai Mar 16 '13 at 16:00
add comment

1 Answer

Create a java.bat batch file that sits higher up in the user's %PATH% than either version of java. In this batch file, set up your prompt for which version to use and then call that version explictly (i.e., by path) with the same arguments that were given to the original command.

Something like:

CHOICE /N /C:12 "Select Java version 1) 1.5-11, 2) 1.7.0-04"
if %ERRORLEVEL% 1 C:\wherever\Java\1.5\lives\bin\java %*
if %ERRORLEVEL% 2 C:\wherever\Java\1.7\lives\bin\java %*

should do it

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.