Skip to content

Instantly share code, notes, and snippets.

@Devendra0110
Last active September 22, 2023 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Devendra0110/7a1ccc95bd0f3d1c6175d02bdda737c3 to your computer and use it in GitHub Desktop.
Save Devendra0110/7a1ccc95bd0f3d1c6175d02bdda737c3 to your computer and use it in GitHub Desktop.
Path set up for java in fish

Before going ahead make sure you have installed java if not follow How To Install Java Development Kit 11 on Debian 10

In the above following article stop at 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
  1. Save the changes and exit your text editor.
  2. 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment