Skip to content

Commit

Permalink
feat(posts): add "How to find Java versions on macOS"
Browse files Browse the repository at this point in the history
Post: 2024-08-05-macos-find-java-versions.md
  • Loading branch information
remarkablemark committed Aug 6, 2024
1 parent bc724ac commit 8d75f31
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions _posts/2024/2024-08-05-macos-find-java-versions.md
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
```

0 comments on commit 8d75f31

Please sign in to comment.