Skip to content

Commit 1b2b35d

Browse files
committed
Changed the readme so powershell users know to use the ps1 script due to #27
1 parent f050c21 commit 1b2b35d

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ I hope you enjoy it. Please give me a star if you like my work. Thank you!
1717
1) **Clone this repository**
1818
2) **Add it to the path**
1919
3) **Run `jenv` once so the script can do the rest**
20-
4) **If your using cmd you need to call the batch file. If you use powershell its recommended to do so as well but it should also work if you call /src/jenv.ps1**
20+
4) **If your using cmd you need to call the batch file. If you use powershell you should call /src/jenv.ps1**
2121
5) **Some reported problems putting JEnv into their C:/Programs folder due to required admin rights**
2222
6) **I hope I could help you. Else open an issue**
2323

@@ -28,11 +28,17 @@ Example: `jenv add jdk15 D:\Programme\Java\jdk-15.0.1`
2828

2929
2) **Change your java version for the current session**
3030
*jenv use `<name>`*
31-
Example: `jenv use jdk15`
31+
Example: `jenv use jdk15`
32+
Environment var for scripting:
33+
---PowerShell: `$ENV:JENVUSE="jdk17"`
34+
---CMD/BATCH: `set "JENVUSE=jdk17"`
3235

3336
3) **Clear the java version for the current session**
3437
*jenv use remove*
35-
Example: `jenv use remove`
38+
Example: `jenv use remove`
39+
Environment var for scripting:
40+
---PowerShell: `$ENV:JENVUSE=$null`
41+
---CMD/BATCH: `set "JENVUSE="`
3642

3743
4) **Change your java version globally**
3844
*jenv change `<name>`*
@@ -54,6 +60,13 @@ Example: `jenv list`
5460
*jenv remove `<name>`*
5561
Example: `jenv remove jdk15`
5662

63+
9) **COMING SOON: Enable the use of javac, javaw or other executables sitting in the java directory**
64+
*jenv link `<Executable name>`*
65+
Example: `jenv link javac`
66+
67+
10) **COMING SOON: Uninstall jenv and automatically restore a Java version of your choice**
68+
*jenv uninstall `<name>`*
69+
Example: `jenv uninstall jdk17`
5770
## How does this work?
5871
This script creates a java.bat file that calls the java.exe with the correct version
5972
When the ps script changes env vars they get exported to tmp files and applied by the batch file

0 commit comments

Comments
 (0)