Install OpenJDK: sudo apt-get install openjdk-8-jdk. The latest JDK is installed. Verify the version of the JDK: java -version. openjdk version "1.8.0_242" OpenJDK Runtime Environment (build 1.8.0_242-b09) OpenJDK 64-Bit Server VM (build 25.242-b09, mixed mode) If the correct version of Java is not being used, use the alternatives command to
09/28/2023. Microsoft today announced its "Microsoft Build of OpenJDK 21," taking advantage of new features and functionality in Java 21. In its "About the Microsoft Build of OpenJDK" guidance, the company says: "The Microsoft Build of OpenJDK is a no-cost distribution of OpenJDK that's open source and available for free for anyone to deploy
In your case, run setx JAVA_HOME "D:\Program Files\Java\jdk-11.0.1". You should see a message that says "SUCCESS: Specified value was saved". Then run setx WSLENV "JAVA_HOME/p". You should see the success message again. Type 'env' into your WSL bash prompt. You should see JAVA_HOME correctly set at this point.
brew install openjdk@8 brew install openjdk@11 brew install openjdk@17 brew install openjdk@20 Update the wrapper, As a new mac user (switching from Windows
For example, if version -java returns Java 1.8.X, install OpenJDK 8. In Windows ®, you can automatically set the JAVA_HOME environment variable during installation by selecting the Set JAVA_HOME variable option on the Custom Setup screen.In case you are still looking for a Windows build of OpenJDK, Azul Systems launched the Zulu product line last fall. The Zulu distribution of OpenJDK is built and tested on Windows and Linux. We posted the OpenJDK 8 version this week, though OpenJDK 7 and 6 are both available too.AFJKLW.