oracle / javavscode

Java platform support for Visual Studio Code for full featured Java development (edit-compile-debug & test cycle)
Apache License 2.0
231 stars 31 forks source link

Oracle Java SE Language Server not enabled #316

Closed castlea121 closed 4 weeks ago

castlea121 commented 4 weeks ago

After downloading the Java JDK it will not initialise the repo and come with the the bellow error.

Launching Oracle Java SE Language Server with default system JDK and userdir /Users/adamcatle/Library/Application Support/Code/User/workspaceStorage/877f31bc97700973c317e40a9e464de9/Oracle.oracle-java LSP server launching: 30905 LSP server user directory: /Users/adamcatle/Library/Application Support/Code/User/workspaceStorage/877f31bc97700973c317e40a9e464de9/Oracle.oracle-java Cannot run on older versions of Java than Java 17. Please install Java 17 or newer or use --jdkhome switch to point to its installation directory. Cannot find org.netbeans.modules.java.lsp.server in the log! Please refer to troubleshooting section for more info: https://github.com/oracle/javavscode/blob/main/README.md#troubleshooting Request to kill LSP server. Cannot kill: Requested kill on 30905, current process is None Oracle Java SE Language Server not enabled

sid-srini commented 4 weeks ago

Hi @castlea121. Thanks for reaching out.

The extension requires JDK 17 or higher to run, while your projects can use a different JDK, which is version 8 and above.

Please refer to the Getting Started and JDK Downloader sections. The JDK Downloader page allows you to also select the path to the JDK home folder of a one that is already installed on your machine. This will set the value of the jdk.jdkhome setting. Note, that on MacOS, the JDK home folder is the Contents/Home/ folder inside the jdk package.

For setting up the JDK for individual projects, refer to the Selecting the JDK section, specifically the jdk.project.jdkhome workspace setting.

I hope this helps you get started. Please let us know if you have any other issues or questions. Thanks.