You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Configure Java runtime" gives no option to install macOS arm64 JDK #2201
I just opened a java project on an arm64 Mac for the first time, and the extension isn't providing an option to install an arm64 jdk (or recognizing my current jdk).
Environment
Operating System: macOS 12 (arm64)
JDK version: 11.0.2
Visual Studio Code version: 1.62.0
Java extension version: 1.0.0
Steps To Reproduce
Install Zulu build of openjdk 11 through IntelliJ
2. JDK seems to live at ~/Library/Java/JavaVirtualMachines
Install VS Code and the java extension
Get message saying that Java 11 or newer must be installed
Click the blue text to open the configuration page
Observe that the install options given are only for Mac x64 and not ARM64, even though adoptium.net has aarch64 builds of jdk17 for macOS. I would be glad to help contribute a fix, but I'm not sure of where the relevant code is in the codebase, and I didn't have any success with a GitHub search.
What I see when opening the configure java runtime page:
adoptium.net, showing the availability of JDK17 for aarch64:
In Node.js, the os.arch() method (and process.arch property) returns a string identifying the operating system CPU architecture for which the Node.js binary was compiled.
This is not the same as the operating system CPU architecture. For example, you can run Node.js 32-bit on a 64-bit OS. In that situation, os.arch() will return a misleading 'x86' (32-bit) value, instead of 'x64' (64-bit).
Above is the reason to use arch lib instead of native API os.arch(). But for macOS we don't have such problem and we can always map arm64 to aarch64 to find compatible JDK.
but still fail to recognize my existing jdk which is installed at '~/Library/Java/JavaVirtualMachines'.
We'll cover that in next release of java-extension-pack, using a new package to find all installed java runtimes.
BTW, we've changed the UX of "configure java runtime" page, separating "project JDKs" from "Java tooling runtime", to avoid confusion. @00001011b "Installed JDKs" tab is now removed. So I want to know whether this tab helps, and how you use it.
but still fail to recognize my existing jdk which is installed at '~/Library/Java/JavaVirtualMachines'.
We'll cover that in next release of java-extension-pack, using a new package to find all installed java runtimes.
BTW, we've changed the UX of "configure java runtime" page, separating "project JDKs" from "Java tooling runtime", to avoid confusion. @00001011b "Installed JDKs" tab is now removed. So I want to know whether this tab helps, and how you use it.
Activity
Eskibear commentedon Nov 10, 2021
This webview is implemented in https://github.com/microsoft/vscode-java-pack
BTW, the architecture is fetched via lib arch, but I'm not sure whether aarch64 is supported. See: https://github.com/microsoft/vscode-java-pack/blob/a656bd303b633bd0542b1acb090d224018e93b50/src/utils/adoptiumApi.ts#L114-L118
Contribution is welcome.
testforstephen commentedon Nov 10, 2021
what node.js API returns is arm64, which is equivalent to aarch64 .
Eskibear commentedon Nov 10, 2021
Above is the reason to use
archlib instead of native APIos.arch(). But for macOS we don't have such problem and we can always maparm64toaarch64to find compatible JDK.00001011b commentedon Nov 26, 2021
Now it can detect arm-macOS collectly, but still fail to recognize my existing jdk which is installed at '~/Library/Java/JavaVirtualMachines'.
There are two jdk (see below) in my OS. Failed to check the 'x64' one.

Environment
Eskibear commentedon Nov 26, 2021
We'll cover that in next release of java-extension-pack, using a new package to find all installed java runtimes.
BTW, we've changed the UX of "configure java runtime" page, separating "project JDKs" from "Java tooling runtime", to avoid confusion.
@00001011b "Installed JDKs" tab is now removed. So I want to know whether this tab helps, and how you use it.
00001011b commentedon Nov 26, 2021
I agree to remove it.(thank you for your reply)
fbricon commentedon Feb 12, 2026
Closing as this is provided by the Java extension pack, and that issue has been fixed since then:
If you still have an issue, open a ticket at https://github.com/microsoft/vscode-java-pack/issues