-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(posts): add "How to find Java versions on macOS"
Post: 2024-08-05-macos-find-java-versions.md
- Loading branch information
1 parent
bc724ac
commit 8d75f31
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
layout: post | ||
title: How to find Java versions on macOS | ||
date: 2024-08-05 21:14:25 | ||
excerpt: How to find Java versions on macOS. | ||
categories: macos java | ||
--- | ||
|
||
List Java versions on macOS: | ||
|
||
```sh | ||
/usr/libexec/java_home -V | ||
``` | ||
|
||
You should see something like: | ||
|
||
```sh | ||
Matching Java Virtual Machines (3): | ||
22.0.1 (arm64) "Eclipse Adoptium" - "OpenJDK 22.0.1" /Library/Java/JavaVirtualMachines/temurin-22.jdk/Contents/Home | ||
17.0.11 (arm64) "Homebrew" - "OpenJDK 17.0.11" /opt/homebrew/Cellar/openjdk@17/17.0.11/libexec/openjdk.jdk/Contents/Home | ||
11.0.18 (arm64) "Azul Systems, Inc." - "Zulu 11.62.17" /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/Library/Java/JavaVirtualMachines/temurin-22.jdk/Contents/Home | ||
``` | ||
|
||
The JDK is located in: | ||
|
||
```sh | ||
ls /Library/Java/JavaVirtualMachines/ | ||
``` | ||
|
||
``` | ||
openjdk-17.jdk temurin-22.jdk zulu-11.jdk | ||
``` |