Reputation: 11935
How can I know the value of JAVA_HOME variable on Ubuntu Server?
I tried with echo $JAVA_HOME
but I read a white line.
Upvotes: 0
Views: 5729
Reputation: 4452
You might have checked the value immediately after setting it in /etc/environment file.
Solution: Try manually refreshing the file by typing below in the command prompt.
Note: observe the "." before the path "/etc/environment".
. /etc/environment
Alternate solution is try STEP 8 shown here.
Upvotes: 0
Reputation: 13
You can just type:
$JAVA_HOME
If that doesn't give you anything maybe the variable isn't set up yet, you can try typing:
JAVA_HOME=/your_java_home
and then typing
$JAVA_HOME 'or' echo $JAVA_HOME
to see if it works.
Upvotes: 0