This is replication of blog written by dshuck on Mar-21-09 6:32am
From: daveshuck.instantspot.com
To install Oracle/Sun Java please refer to How to install Java in Ubuntu post.
Here I discuss, how to set JAVA_HOME variable and the PATH variable to your Java installation.
First using the terminal open the .bashrc which is at your home.
Now run,
To install Oracle/Sun Java please refer to How to install Java in Ubuntu post.
Here I discuss, how to set JAVA_HOME variable and the PATH variable to your Java installation.
First using the terminal open the .bashrc which is at your home.
Now add the following to the end of the file.gedit ~/.bashrc
JAVA_HOME=/usr/lib/jvm/javaNOTE: If /usr/lib/jvm/java does not match the actual JAVA_HOME path in your environment, then set the actual JAVA_HOME, where you have installed Java in your machine.
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
Now run,
source ~/.bashrcThen, try running the following commands and check whether your getting the appropriate responses:
echo $JAVA_HOMEIf it not work try after restarting
/usr/lib/jvm/java
echo $PATH
:/usr/lib/jvm/java/bin
to install sun java6 just type
ReplyDeletesudo apt-get install sun-java6-jdk
in the terminal
for Ubunhu 10.04
ReplyDeletesudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
then install...
sudo apt-get install sun-java6-jdk
sudo apt-get install sun-java6-jre
Actually you dont need a restart... you can simply do a source to reload the changes.
ReplyDelete@Rajat Thanks,
ReplyDeleteso you have to just type
source /etc/bash.bashrc
to reload the changes.
Hi Suho Thayan
ReplyDeleteI try to get Ant working in Ubuntu 10.04.
I need this because I want to try to install Opentaps; kind of ERP for lean manufacturing
As I followed your instructions. Not succeeded, Build XML does not exist.
I also tried all the files in /usr/lib/jvm:
- java-1.5.0-gcj-4.4
- java-1.6.0-openjdk In this one tools.jar was expected to be inside
- java-6-openjdk
- java-6-sun
- java-6-sun-1.6.0.22
I really hope you can help me out of this.
Ant appears to be quite complex sometimes.
Await your feedback with interest.
Kind regards.
Frans van der Star
Malaysia
f.van.der.star@gmail.com
@Frans van der Star
ReplyDeleteIts nothing to do with Java, since it says Build XML not exist, ant should have got installed properly
type,
ant -version
in your terminal. If it prints something like this,
"Apache Ant version 1.7.1 compiled on September 8 2010"
your done with the ant installation
else run,
sudo apt-get install ant
to install ant
when running ant you should run the command "ant" from the directory where it contains the file build.xml
I think you can find one in the Opentaps directories
regards
Dear Suho Thayan,
ReplyDeleteThanks.
I got the result you mentioned.
http://www.opentaps.org/forum/opentaps-general-discussions/general-discussions-english/step-step-instructions-ubuntu
These are instructions for install opentaps.
Now I see!!
I had to do cd the directory opentaps
Then type ant.
Now I get the result:
Build successfull
1 minute 54 seconds.
Only one question remains;
java home: Which one I should use:
- java-1.5.0-gcj-4.4
- java-1.6.0-openjdk In this one tools.jar was expected to be inside
- java-6-openjdk
- java-6-sun
- java-6-sun-1.6.0.22
Or does not matter???
Till now thanks a lot!!
Greetings
Frans
If you want to stay in touch feel free emailing me
f.van.der.star@gmail.com!!
P.S.: Do you have expertise and knowledge ERP-systems?
great :)
ReplyDeleteUse either
- java-6-sun-1.6.0.22
or
- java-1.6.0-openjdk
Any sun or openjdk latest version would do
Sorry, I don't have experience in ERP-systems :(
Thanks
ReplyDeleteIt is all working now.
use java-6-sun-1.6.0.22
Kind regards
Frans
Thank you!! JAVA_HOME was successfully set!!
ReplyDeletethanks for the post
ReplyDeleteGood post. I have also shared about How to Set JAVA_HOME in Windows and Unix , this article also talks about difference between JAVA_HOME and java.home variable.
ReplyDelete