Ask Your Question
1

how to set path for java in linux

asked 2017-02-15 00:47:29 -0600

Bagya Raman gravatar image

i had installed JDK and JRE package. but setting path i have no idea in linux

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-02-15 08:54:35 -0600

ibanha gravatar image

Open file .bashrc in your home directory. Add to the file a few line:

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk
export JDK_HOME=/usr/lib/jvm/java-7-openjdk
export JRE_HOME=/usr/lib/jvm/java-7-openjdk/jre

(java path could be different)

export PATH="$PATH:$JAVA_HOME/bin:$JRE_HOME/bin"

Save file.

Reboot your OS.

Read this article

edit flag offensive delete link more

Comments

in what name should i save

Bagya Raman gravatar imageBagya Raman ( 2017-04-05 04:10:18 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-02-15 00:47:29 -0600

Seen: 2,402 times

Last updated: Feb 15 '17