Changing Java Version for a Specific Program

前端 未结 3 1229
挽巷
挽巷 2021-01-24 23:25

If I have more than one version of Java installed can I specify the version I want to kick a program off with via batch file, or do I have to change my environment variable? If

3条回答
  •  情书的邮戳
    2021-01-25 00:12

    If you want to do it for a specific instance of a program why not specify the full path, e.g.

    if "%1" == "6.20" (
    
    'C:\Program Files\Java\jdk1.6.0_20\bin\java.exe' -version
    

    )

提交回复
热议问题