DevotionGeo

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

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

finner

hi @DevotionGeo - I’ve never even heard of asdf before :blush:
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

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 Top

brennan
Trying to understand recursion in Elixir. Sometimes it is simple based on the problem, sometimes it is hard. Any suggestions on how to le...
New
New
sona11
How can I apply a modified date and time to a variable? This is what I get when I execute the following query in SQL Server Mgmt Studio: ...
New
finner
Hello devtalk ! Heroku are closing their free tier (dynos) later this month and I was wondering if you guys could recommend any alternat...
New
DevotionGeo
I have always used antique keyboards like Cherry MX 1800 or Cherry MX 8100 and almost always have modified the switches in some way, like...
New
harwind
I have an array of strings in JavaScript, and I need to convert it into a single string with specific delimiter characters between the el...
/js
New
jaeyson
Is Rust still good to learn? Last time (ages ago) I heard there was changes made by the foundation. If not, is Go suitable for api and w...
New
harwind
I’m working on a SQL query for a database containing records of customer transactions. Each transaction has a transaction_id, customer_id...
New
harwind
I’m working on a web application where users can sign up with their email addresses. To ensure data integrity, I want to implement client...
/js
New
harwind
Hi, Take a riveting look at exception handling in Java programming, including the complicated dance between try-catch blocks, checked an...
New

Other popular topics Top

wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
AstonJ
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
PragmaticBookshelf
“Finding the Boundaries” Hero’s Journey with Noel Rappin @noelrappin Even when you’re ultimately right about what the future ho...
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New
PragmaticBookshelf
Author Spotlight Jamis Buck @jamis This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
New
PragmaticBookshelf
Author Spotlight: Peter Ullrich @PJUllrich Data is at the core of every business, but it is useless if nobody can access and analyze ...
New
CommunityNews
A Brief Review of the Minisforum V3 AMD Tablet. Update: I have created an awesome-minisforum-v3 GitHub repository to list information fo...
New