Misael Landeros
Misael Landeros

Reputation: 595

Make export JAVA_HOME=`/usr/libexec/java_home -v 1.8` permanent

I making an App whit JHipster I have two java SDK 14 and 8

every time I need to run JHpster I have to do in the terminal

export JAVA_HOME=`/usr/libexec/java_home -v 1.8`

i want to make it permanent for this folder

im on macOS Catalina

Upvotes: 0

Views: 206

Answers (1)

Marcio Lucca
Marcio Lucca

Reputation: 380

In Linux, edit file "~/.bashrc", add the export command in that.

echo 'export JAVA_HOME=`/usr/libexec/java_home -v 1.8`' >> ~/.bashrc

Then, on a new shell, you should be able to see the variable exported. If you want to use the variable in your current GNOME/KDE session, you will need to logout/login again.

Either that or you will need to create a script to launch your application/compiler.

Upvotes: 2

Related Questions