Skip to content

Commit

Permalink
docs: Explain how you can install an existing jdk (#1487)
Browse files Browse the repository at this point in the history
* docs: Explain how you can install an existing jdk

* Update docs/modules/ROOT/pages/javaversions.adoc

Co-authored-by: Max Rydahl Andersen <max.andersen@gmail.com>
  • Loading branch information
jmini and maxandersen authored Oct 20, 2022
1 parent dae3dff commit d453045
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions docs/modules/ROOT/pages/javaversions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ This will return the path to the "default" JDK (by default `~/.jbang/currentjdk)
specific JDK you can pass the version as an argument: `jbang jdk home 14`. This command could be used by scripts to find
a JDK to use to run a Java program for example (eg: `JAVA_HOME=$(jbang jdk home)`.

The `install` command decribed in the previous section allows you to specify the path of your existing JDK installation:

jbang jdk install 17 <path-of-existing-java-17-installation>

So if you are managing your jdk installations with https://sdkman.io/[SDKMAN!] you can easilly configure JBang to use one of your installed version:

jbang jdk install 17 `sdk home java 17.0.4.1-tem`


For setting up your current command line environment there's something simpler. You can run:

jbang jdk java-env
Expand Down

0 comments on commit d453045

Please sign in to comment.