From ee3e910fe09822a5f9000fcca820d175943ccf9e Mon Sep 17 00:00:00 2001 From: Sonal Budhiraja <57969266+sbudhirajadoc@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:13:52 -0700 Subject: [PATCH] docs: java setup update (#5655) * docs: java setup update added java 21 support * Update java-setup.md Deepa's comments * Update README.md JDK 21 update * Update README.md Java 21 update * Update java-setup.md * Update java-setup.md Deepa's nit. * Update packages/salesforcedx-vscode-expanded/README.md Co-authored-by: mleonardsfdc * Update packages/salesforcedx-vscode-expanded/README.md Co-authored-by: mleonardsfdc * Update packages/salesforcedx-vscode/README.md Co-authored-by: mleonardsfdc * Update packages/salesforcedx-vscode/README.md Co-authored-by: mleonardsfdc * Update packages/salesforcedx-vscode-expanded/README.md Co-authored-by: mleonardsfdc * Update packages/salesforcedx-vscode/README.md Co-authored-by: mleonardsfdc --------- Co-authored-by: mleonardsfdc --- .../_articles/en/vscode-desktop/java-setup.md | 51 +++++++++---------- .../salesforcedx-vscode-expanded/README.md | 6 +-- packages/salesforcedx-vscode/README.md | 7 +-- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/docs/_articles/en/vscode-desktop/java-setup.md b/docs/_articles/en/vscode-desktop/java-setup.md index 01cc7937bd..e7d90298ec 100644 --- a/docs/_articles/en/vscode-desktop/java-setup.md +++ b/docs/_articles/en/vscode-desktop/java-setup.md @@ -3,7 +3,7 @@ title: Java Setup lang: en --- -The Apex Language Server, shipped as part of the Salesforce Apex Extension for VS Code, depends on the Java Platform, Standard Edition Development Kit (JDK). It requires an installation of either JDK version 17 (Recommended), or JDK version 11. By default, the extension attempts to locate your local Java installation by looking for a `JAVA_HOME` or `JDK_HOME` environment variable on your computer. If the extension can't find your Java installation, or if you want it to use a different installation, change the `salesforcedx-vscode-apex.java.home` setting. +The Apex Language Server, shipped as part of the Salesforce Apex Extension for VS Code, depends on the Java Platform, Standard Edition Development Kit (JDK). It requires an installation of JDK version 21 (Recommended), JDK version 17, or JDK version 11. By default, the extension attempts to locate your local Java installation by looking for a `JAVA_HOME` or `JDK_HOME` environment variable on your computer. If the extension can't find your Java installation, or if you want it to use a different installation, change the `salesforcedx-vscode-apex.java.home` setting. ## Download and Install JDK You can download the JDK from one of these locations. @@ -12,31 +12,28 @@ You can download the JDK from one of these locations. [Adoptium](https://adoptium.net) provides prebuilt OpenJDK binaries for free without authentication or complications. -1. Navigate to [Adoptium](https://adoptium.net/?variant=openjdk17). -2. Select **Temurin 17 (LTS)**. -3. Click the **Latest Release** button to download. -4. After the file has downloaded, open it and complete the installation steps. +1. Navigate to the [Adoptium JDK 21](https://adoptium.net/?variant=openjdk21) download page. +2. Select the installer applicable to your system. +3. Download and open the downloaded file and complete the installation steps. ### Zulu Zulu Java builds are TCK-tested and free to download and use without restrictions. -1. Navigate to the [Zulu download page](https://www.azul.com/downloads/zulu/). -2. Click the **Choose Your Download** button. -3. Select Java Version **Java 17 (LTS)**. -4. Select your OS. -5. Select your Architecture. -6. Select your Java Package (JDK). -7. Download the installer. -8. Once the file is downloaded open it and complete the installation steps. +1. Navigate to the [Zulu JDK 21](https://www.azul.com/downloads/?package=jdk#zulu) download page. +2. Scroll down to Java Version **Java 21 (LTS)**. +3. Select your OS. +4. Select your Architecture. +5. Select your Java Package (JDK). +6. Click the **Download** button.. +8. Once the file is downloaded, open it and complete the installation steps. -### Oracle Java 17 (Officially Tested) +### Oracle Java 21 -1. Navigate to the [download page](https://www.oracle.com/java/technologies/downloads/). -2. Navigate to **Java SE Development Kit 17.0.10 downloads**. -3. Click the download link that applies to your OS. -4. If prompted to log in, use your Oracle account. -5. Once the file is downloaded open it and complete the installation steps. +1. Navigate to the [Oracle JDK 21](https://www.oracle.com/java/technologies/downloads/#java21) download page. +2. Click the download link that applies to your OS. +3. If prompted to log in, use your Oracle account. +4. Once the file is downloaded, open it and complete the installation steps. **Note**: Installing from the executable correctly installs Java in the standard Java Home path (C:\Program Files\) making setting the JDK path straightforward. @@ -52,13 +49,13 @@ Update the salesforcedx-vscode-apex.java.home setting to the full pathname of th ![Apex Java Setting](./images/apex-java-home-setting.png) -Some examples of folder paths to the Java 11 or Java 17 runtime: +Some examples of folder paths to the Java 21 runtime: **MacOS**: ```json { - "salesforcedx-vscode-apex.java.home": "/Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home" + "salesforcedx-vscode-apex.java.home": "/Library/Java/JavaVirtualMachines/temurin-21.jdk/Contents/Home" } ``` @@ -66,7 +63,7 @@ Some examples of folder paths to the Java 11 or Java 17 runtime: ```json { - "salesforcedx-vscode-apex.java.home": "C:\\Program Files\\Eclipse Adoptium\\jdk-17.0.2.8-hotspot" + "salesforcedx-vscode-apex.java.home": "C:\\Program Files\\Eclipse Adoptium\\jdk-21.0.3.9-hotspot" } ``` @@ -76,15 +73,15 @@ Some examples of folder paths to the Java 11 or Java 17 runtime: ```json { - "salesforcedx-vscode-apex.java.home": "/usr/lib/jvm/java-17-openjdk-amd64" + "salesforcedx-vscode-apex.java.home": "/usr/lib/jvm/java-21-openjdk-amd64" } ``` -**Arch Linux (installation via AUR using package `jdk17-adoptopenjdk`)**: +**Arch Linux (installation via AUR using package `jdk21-adoptopenjdk`)**: ```json { - "salesforcedx-vscode-apex.java.home": "/usr/lib/jvm/java-17-adoptopenjdk" + "salesforcedx-vscode-apex.java.home": "/usr/lib/jvm/java-21-adoptopenjdk" } ``` @@ -95,10 +92,10 @@ Some examples of folder paths to the Java 11 or Java 17 runtime: If your Java version is located at the following path: - `C:\Program Files\Java\jdk-17` + `C:\Program Files\Java\jdk-21` Your Java Home path should like this: - `C:\\Program Files\\Java\\jdk-17` + `C:\\Program Files\\Java\\jdk-21` diff --git a/packages/salesforcedx-vscode-expanded/README.md b/packages/salesforcedx-vscode-expanded/README.md index 8466d33100..96a3b0bbb0 100644 --- a/packages/salesforcedx-vscode-expanded/README.md +++ b/packages/salesforcedx-vscode-expanded/README.md @@ -14,11 +14,11 @@ Before you set up Salesforce Extensions for VS Code, make sure that you have the Open your Salesforce DX project in a directory that contains an `sfdx-project.json` file. Otherwise, some features don’t work. If you don't already have a Salesforce DX project, create one with the **SFDX: Create Project** command (for development against scratch orgs) or the **SFDX: Create Project with Manifest** command (for development against sandboxes or DE orgs). Or, see [create a Salesforce DX project](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_workspace_setup.htm) for information about setting up a project using Salesforce CLI. - **Java Platform, Standard Edition Development Kit** - Some features in Salesforce Extensions for VS Code depend upon the Java Platform, Standard Edition Development Kit (JDK). You need to have either version 11 or version 17 of the JDK installed. + Some features in Salesforce Extensions for VS Code depend upon the Java Platform, Standard Edition Development Kit (JDK). You need to have either version 11, version 17, or version 21 of the JDK installed. - If you don’t already have version 11 or 17 of the JDK installed, you can install the latest version of the Java 11 JDK from [Java 11 Downloads](https://www.oracle.com/java/technologies/downloads/#java11) or Java 17 from [Java 17 Downloads](https://www.oracle.com/java/technologies/downloads/#java17). + If you don’t already have version 11, 17, or 21 of the JDK installed, you can install the latest version of the Java 11 JDK from [Java 11 Downloads](https://www.oracle.com/java/technologies/downloads/#java11), Java 17 from [Java 17 Downloads](https://www.oracle.com/java/technologies/downloads/#java17), or Java 21 from [Java 21 Downloads](https://www.oracle.com/java/technologies/downloads/#java21). - If you also use other versions of the JDK, set your VS Code user setting `salesforcedx-vscode-apex.java.home` to point to the location where you installed Java 11 or 17. + If you also use other versions of the JDK, set your VS Code user setting `salesforcedx-vscode-apex.java.home` to point to the location where you installed Java 11, 17, or 21. - **[Visual Studio Code](https://code.visualstudio.com/download) v1.82.0 or later** diff --git a/packages/salesforcedx-vscode/README.md b/packages/salesforcedx-vscode/README.md index bd5abfa013..244d090ece 100644 --- a/packages/salesforcedx-vscode/README.md +++ b/packages/salesforcedx-vscode/README.md @@ -14,11 +14,12 @@ Before you set up Salesforce Extensions for VS Code, make sure that you have the Open your Salesforce DX project in a directory that contains an `sfdx-project.json` file. Otherwise, some features don’t work. If you don't already have a Salesforce DX project, create one with the **SFDX: Create Project** command (for development against scratch orgs) or the **SFDX: Create Project with Manifest** command (for development against sandboxes or DE orgs). Or, see [create a Salesforce DX project](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_workspace_setup.htm) for information about setting up a project using Salesforce CLI. - **Java Platform, Standard Edition Development Kit** - Some features in Salesforce Extensions for VS Code depend upon the Java Platform, Standard Edition Development Kit (JDK). You need to have either version 11 or version 17 of the JDK installed. + + Some features in Salesforce Extensions for VS Code depend upon the Java Platform, Standard Edition Development Kit (JDK). You need to have either version 11, version 17, or version 21 of the JDK installed. - If you don’t already have version 11 or 17 of the JDK installed, you can install the latest version of the Java 11 JDK from [Java 11 Downloads](https://www.oracle.com/java/technologies/downloads/#java11) or Java 17 from [Java 17 Downloads](https://www.oracle.com/java/technologies/downloads/#java17). + If you don’t already have version 11, 17 or 21 of the JDK installed, you can install the latest version of the Java 11 JDK from [Java 11 Downloads](https://www.oracle.com/java/technologies/downloads/#java11), Java 17 from [Java 17 Downloads](https://www.oracle.com/java/technologies/downloads/#java17), or Java 21 from [Java 21 Downloads](https://www.oracle.com/java/technologies/downloads/#java21). - If you also use other versions of the JDK, set your VS Code user setting `salesforcedx-vscode-apex.java.home` to point to the location where you installed 11 or 17. + If you also use other versions of the JDK, set your VS Code user setting `salesforcedx-vscode-apex.java.home` to point to the location where you installed Java 11, 17, or 21. - **[Visual Studio Code](https://code.visualstudio.com/download) v1.82 or later**. We recommend that you use Salesforce Extension Pack versions earlier than 59.15.0 if you aren't able to update your version of VS Code. Note that we aren't able to support fixes for these earlier versions.