Skip to content

Commit

Permalink
Merge pull request #174 from Achal1607/javavscode-172
Browse files Browse the repository at this point in the history
Updated README for how to use JDK EA builds with extension
  • Loading branch information
Achal1607 authored Jun 17, 2024
2 parents bf87f10 + 9c4ec2e commit 6583a13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,11 @@ following locations:

As soon as one of the settings is changed, the Language Server is restarted.

## Disable the embedded nb-javac and use javac from the JDK
`View | Command Palette | Preferences:Open User Settings | Jdk > Advanced > Disable: Nbjavac` setting facilitates simpler experimentation with early access JDK builds. JDK early access builds can be specified in `jdk.jdkhome`, and nb-javac can be disabled, ensuring that the extension utilizes the javac from the early access build.
## How to use JDK early access builds
This setup makes it easier to experiment with early access JDK builds. Follow these steps to enable the use of an early access JDK:
Step-1: Navigate to `View | Command Palette | Preferences:Open User Settings | Jdk > Advanced > Disable: Nbjavac` and enable the checkbox.

## Running Language Server per VSCode workspace or for user
It is possible to run Oracle Java Platform extension per workspace (VSCode window). This allows separation of Language Server for given project as Language Server JVM is not shared for more VSCode open workspaces (projects).
It is possible to change this in `View | Command Palette | Preferences:Open User Settings | Jdk: Userdir`. Set to `local` to use dedicated Language Server per workspace or set to `global` to have one Language Server for all VS Code workspaces.
Step-2: Set the JDK in `View | Command Palette | Preferences:Open User Settings (JSON) ...` by updating the __jdk.jdkhome__ setting to point to the early access JDK path.

## Troubleshooting
If your extension is not starting and throwing some error like no JDK found even if you have a working JDK installed in your machine, then you can try deleting cache for the workspace using `View | Command Palette | Delete oracle java extension cache for this workspace`.
Expand Down
9 changes: 4 additions & 5 deletions vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,11 @@ following locations:

As soon as one of the settings is changed, the Language Server is restarted.

## Disable the embedded nb-javac and use javac from the JDK
`View | Command Palette | Preferences:Open User Settings | Jdk > Advanced > Disable: Nbjavac` setting facilitates simpler experimentation with early access JDK builds. JDK early access builds can be specified in `jdk.jdkhome`, and nb-javac can be disabled, ensuring that the extension utilizes the javac from the early access build.
## How to use JDK early access builds
This setup makes it easier to experiment with early access JDK builds. Follow these steps to enable the use of an early access JDK:
Step-1: Navigate to `View | Command Palette | Preferences:Open User Settings | Jdk > Advanced > Disable: Nbjavac` and enable the checkbox.

## Running Language Server per VSCode workspace or for user
It is possible to run Oracle Java Platform extension per workspace (VSCode window). This allows separation of Language Server for given project as Language Server JVM is not shared for more VSCode open workspaces (projects).
It is possible to change this in `View | Command Palette | Preferences:Open User Settings | Jdk: Userdir`. Set to `local` to use dedicated Language Server per workspace or set to `global` to have one Language Server for all VS Code workspaces.
Step-2: Set the JDK in `View | Command Palette | Preferences:Open User Settings (JSON) ...` by updating the __jdk.jdkhome__ setting to point to the early access JDK path.

## Troubleshooting
If your extension is not starting and throwing some error like no JDK found even if you have a working JDK installed in your machine, then you can try deleting cache for the workspace using `View | Command Palette | Delete oracle java extension cache for this workspace`.
Expand Down

0 comments on commit 6583a13

Please sign in to comment.