Skip to content

Instantly share code, notes, and snippets.

@theabhayprajapati
Created August 11, 2024 05:20
Show Gist options
  • Save theabhayprajapati/382bd62185e21b3e4002d8adda9f8576 to your computer and use it in GitHub Desktop.
Save theabhayprajapati/382bd62185e21b3e4002d8adda9f8576 to your computer and use it in GitHub Desktop.

How to use Java version which is installed by intellj on machine through terminal

what happend is then you install java version from interllj it will installed what but it will not make it accesble for terninal to use it

for using this you can do this thing.

  1. Go to intellij open project strucutre and check for jdk
  2. open that and get the path from it
  3. copy that path and do like this
export JAVA_HOME=/home/approximator/.jdks/corretto-1.8.0_422
export PATH=$JAVA_HOME/bin:$PATH

by doing this your java version which is intalled from intellij will be accessible from terminal

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