- JEnv allows you to change your current JDK Version.
- This is helpful for testing or if you have projects requiring different versions of java
- For example you can build a gradle project which requires java8 without changing your enviroment variables and than switch back to work with java15
- It's written in cmd and powershell so it can change the enviroment variables and can run on any windows10.
I hope you enjoy it
-
Adds a new Java environment (requires absolute path)
jenv add<name> <path>
Example:jenv add jdk15 D:\Programme\Java\jdk-15.0.1
-
Change your %PATH% and your %JAVA_HOME% for the current session
jenv use<name>
Example: jenv use jdk15 -
Change your %PATH% and your %JAVA_HOME% permanently
jenv change<name>
Example: jenv change jdk15 -
List all your Java environments
jenv list
Example: jenv list -
Remove an exsiting JDK from the JEnv list
jenv remove<name>
Example: jenv remove jdk15
-
Download the jenv.bat and the jenv.ps1 file. You can inspect it with rightmouse edit to see if its malicious
-
Put it into a folder which is in your path so it can be called by the command line.
-
Now you can add your different java versions and swap between them.
-
Call the jenv.bat file. Not the PowerShell file!
-
You maybe dont want to install into your programms folder as the shell maybe require administrator rights to run jenv.
-
I hope I could help you. Else open an issue
You can also call the jenv.ps1 script from powershell.
You cannot call the ps1 script from cmd
An additional parameter to the PowerShell script was added. "--output" alias "-o" will create the tmp files for the batch. See images below