-4

we are new to Ubuntu.Recently we changed my server OS to ubuntu 12.04 from windows 7 . every one have their own login details. one of my college installed Open-Jdk7. I asked him, where you installed JAVA, then he suggested to switch the following directory

su root cd /usr/lib/Jvm Totally 3 folders are there in JVM folder. names are.

java-1.7.0-openjdk-amd64

java-7-openjdk-amd64

java-7-openjdk-common

generally, If you install Java in Windows, we will get 2 folder. 1 folder is for JDKand another points to JRE.

but, in Ubuntu we have 3 folders. is it right?

for my conformation, whether he installed correctly or not. I open Terminal. I run the following 2 commands

java -c java -version both commands are working fine.

now I want to set-up Java-Home and Path for all users at same place.because everyone is working on Application server.

Can anyone explain step-by-step.

Thanks.

ur truly friend
  • 553
  • 4
  • 11
  • 23

1 Answers1

0

open /etc/profile and write these:

JAVA_HOME=<YourJavaHomeDirectory>
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
ihsan kocak
  • 1,541
  • 1
  • 17
  • 26
  • I mention like this. `PATH=PredefinePaths:/usr/lib/jvm/java-7-openjdk-amd64/bin` `JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64"`. I didn't mention any special charachers in between Path and JAVA-HOME variables. Is it right, What I did. – ur truly friend Jul 18 '13 at 11:33