Forked from Devendra0110/java-path-variable-setup.md
Created
September 22, 2023 22:30
-
-
Save gss200610/91b8b1c5a49c784cac7dcfec37f0e6d1 to your computer and use it in GitHub Desktop.
Revisions
-
Devendra0110 revised this gist
Jun 11, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ set --export JAVA_HOME (dirname (dirname (readlink -f (which java)))) set -gx PATH $JAVA_HOME $PATH ``` 2. Save the changes and exit your text editor. 3. Verify that the JAVA_HOME and PATH variables were set correctly: ``` echo $JAVA_HOME echo $PATH -
Devendra0110 revised this gist
Jun 11, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ### Before going ahead make sure you have installed java if not follow [How To Install Java Development Kit 11 on Debian 10](https://www.linode.com/docs/guides/how-to-install-openjdk-on-debian-10/) In the above following article stop at [Set Environment Variables](https://www.linode.com/docs/guides/how-to-install-openjdk-on-debian-10/#set-environment-variables) 1. copy the below code at the end of config.fish ``` -
Devendra0110 created this gist
Jun 11, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ ## Before going ahead make sure you have installed java if not follow [How To Install Java Development Kit 11 on Debian 10](https://www.linode.com/docs/guides/how-to-install-openjdk-on-debian-10/) In the above following article stop at [Set Environment Variables](https://www.linode.com/docs/guides/how-to-install-openjdk-on-debian-10/#set-environment-variables) 1. copy the below code at the end of config.fish ``` ## java 11 jdk set --export JAVA_HOME (dirname (dirname (readlink -f (which java)))) set -gx PATH $JAVA_HOME $PATH ``` 2. Save the changes and exit your text editor. 3 . Verify that the JAVA_HOME and PATH variables were set correctly: ``` echo $JAVA_HOME echo $PATH ``` The JAVA_HOME variable should be set to the directory that contains your OpenJDK installation, and the PATH variable should include the directory that contains the OpenJDK binary files. And continue here [Test the Java Installation (Optional)](test-the-java-installation-optional)