Skip to content

Extension version 1.22.0 cannot find OpenJDK on macOS #3287

Closed

Description

Compiling or running Java code using version 1.22.0 of the extension on macOS 13.5 (Apple Silicon) using VSCode 1.82.1 and OpenJDK Temurin-17.0.8.1+1 results in errors, including the following, suggesting that the JDK cannot be found:

The project was not built since its build path is incomplete.
Cannot find the class file for java.lang.Object.

This is resolved by downgrading to version 1.21.0 of the extension.

Environment
  • Operating System: macOS 13.5 (Apple Silicon)
  • JDK version: OpenJDK Temurin-17.0.8.1+1
  • Visual Studio Code version: 1.82.1
  • Java extension version: 1.22.0
Steps To Reproduce
  1. Reproduced inside a new macOS 13 install running in a virtual machine.
  2. Install VSCode 1.82.1
  3. Install Extension Pack for Java (Includes current 'Language Support for Java by Red Hat', version 1.22.0)
  4. Install VSCode suggested JVM (OpenJDK Temurin-17.0.8.1+1)
  5. Create a HelloWorld.java file
  6. Various compiler errors shown in VSCode.
  7. Downgrade 'Language Support for Java by Red Hat' plugin from 1.22.0 to 1.21.0
  8. Reload VSCode
  9. HelloWorld.java code now compiles and runs.

[Please attach a sample project reproducing the error]

public class HelloWorld {
    public static void main(String[] args) throws Exception {
        System.out.println("Hello, World!"); 
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions