Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Java doesn’t seem to work inside the sandbox. Something about how /usr/bin/java enumerates the available JDKs is being blocked.
In the sandbox, both java -version and /usr/libexec/java_home -V give:
The operation couldn't be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Outside the sandbox, /usr/lib/java_home -V lists the JVMs:
Matching Java Virtual Machines (3):
25.0.1 (arm64) "Eclipse Adoptium" - "OpenJDK 25.0.1" /Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home
21.0.5 (arm64) "Eclipse Adoptium" - "OpenJDK 21.0.5" /Users/me/Library/Java/JavaVirtualMachines/temurin-21.0.5/Contents/Home
17.0.5 (arm64) "Eclipse Adoptium" - "OpenJDK 17.0.5" /Users/me/Library/Java/JavaVirtualMachines/temurin-17.0.5/Contents/Home
/Library/Java/JavaVirtualMachines/temurin-25.jdk/Contents/Home
If I actually symlink the bin/java binary from one of those into my workspace and tell the agent to run it in the sandbox, it works.
./runjava25
openjdk version "25.0.1" 2025-10-21 LTS
OpenJDK Runtime Environment Temurin-25.0.1+8 (build 25.0.1+8-LTS)
OpenJDK 64-Bit Server VM Temurin-25.0.1+8 (build 25.0.1+8-LTS, mixed mode, sharing)
Steps to Reproduce
Ask the agent to run java -version inside the sandbox
Operating System
MacOS
Version Information
Version: 2.5.17 (Universal)
VSCode Version: 1.105.1
Commit: 7b98dcb824ea96c9c62362a5e80dbf0d1aae4770
Date: 2026-02-17T05:58:33.110Z
Build Type: Stable
Release Track: Default
Electron: 39.3.0
Chromium: 142.0.7444.265
Node.js: 22.21.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0
For AI issues: which model did you use?
Auto
Does this stop you from using Cursor
No - Cursor works, but with this issue