Check and export Java path and version Ubuntu


Check java version:

java -version

Check path of installed java:

readlink -f $(which java

Note: remove /bin/java from end of path
In ~/.bashrc file add following command at the end:

export JAVA_HOME='/usr/lib/jvm/java-7-openjdk-amd64/jre/'

Now run:

source ~/.bashrc
Advertisements

I am Senior Software Engineer. I love reading, writing, sharing,developing, hiking, movies, trips, mountains, brooks, hills etc.

Tagged with:
Posted in java

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

StackOverFlow
Categories
Archives
%d bloggers like this: