
DevotionGeo
How to install multiple Java versions?
The version of Java installed with Android Studio on my Mac is the following (when I run java -version
)
openjdk version "1.8.0_242-release"
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
OpenJDK 64-Bit Server VM (build 25.242-b3-6915495, mixed mode)
An hour later I’m taking an online class and one of the prerequisites is OpenJDK 11
.
How do I install both of the versions side by side on my Mac if I don’t have ASDF.
Most Liked

finner
hi @DevotionGeo - I now use sdkman to switch through my Java versions.
Here is the usage page.
On a mac the java sdks will be installed :
/Users/<you>/.sdkman/candidates/java/
In my case I have the following
/Users/<user>/.sdkman/candidates/java/11.0.2-open
/Users/<user>/.sdkman/candidates/java/12.0.2.j9-adpt
/Users/<user>/.sdkman/candidates/java/15.0.2.j9-adpt
current -> /Users/<user>/.sdkman/candidates/java/11.0.2-open
current is a symbolic link which points to the version you are currently using, so from inside an IDE you would have to point to the real folder.
Not sure of that helps you at this stage.

finner
hi @DevotionGeo - I’ve never even heard of asdf
before
From what I can see about asdf
it manages multiple languages, if you are constantly switching between languages and then versions within those languages then maybe asdf
will work well for you. But as I’ve said, I have never used it.
If you do decide to use it let me know what you think.

ohm
I’ve previously used jenv
for handling multiple versions of Java (for use with JRuby), but if you’re already using asdf
I think you should just continue with that and not introduce yet another new tools.
Popular General Dev topics









Other popular topics










Latest in General Dev
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /zig
- /scala
- /html
- /debian
- /nixos
- /lisp
- /agda
- /sublime-text
- /textmate
- /react-native
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /manjaro
- /spring
- /django
- /diversity
- /nodejs
- /lua
- /c
- /julia
- /slackware
- /neovim