LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-25-2006, 07:01 AM   #1
sharp81
Member
 
Registered: Mar 2005
Posts: 79

Rep: Reputation: 15
jdk and tomcat


Hi,
I wanted to upgrade my jdk to jdk 1.5 update 6 .. so I downloaded the rpm from the java sun website and followed the instructions. And everything went on smooth. But when I try to check the version using the command >java -version ... it still shows the version as 1.4 .. I dont know if the new version is upgraded or not .... I thought all the configs and paths would direct to the new install by default

Also I want to know how to upgrade tomcat to a newer version ....

Sharp
 
Old 03-25-2006, 08:52 AM   #2
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Rep: Reputation: 31
What's your $JAVA_HOME environment variable pointing to? Might need to point it to the new version...

Tomcat should be pretty easy - I think you just need to install it to it's own directory, and start it from there.

HTH
 
Old 03-27-2006, 02:26 AM   #3
sharp81
Member
 
Registered: Mar 2005
Posts: 79

Original Poster
Rep: Reputation: 15
Actually earlier I had got into a similar problem when I tried updating my Java as even after changing JAVA_HOME it was still pointing to the old one .... After a lot of trials I had to finally revert back to the older version. I changed the contents in the /etc/profile and even tried restarting the pc but to no avail.

sharp
 
Old 03-27-2006, 02:32 AM   #4
rahulk
Member
 
Registered: Mar 2006
Posts: 110

Rep: Reputation: 16
I think you made an error while properly putting JAVA_HOME variable in your .bash_profile or .bashrc,

did you try to check the value of the environment settings??

echo $JAVA_HOME from your account ?

I am sure you would have hit the root cause.
 
Old 03-27-2006, 02:51 AM   #5
sharp81
Member
 
Registered: Mar 2005
Posts: 79

Original Poster
Rep: Reputation: 15
actually I am doing the setting for all users .. so I set the paths in the etc/profile ... but even after restarting ... it doesnt work ... I have absolutely no idea why this problem is happening ..
 
Old 03-27-2006, 02:52 AM   #6
sharp81
Member
 
Registered: Mar 2005
Posts: 79

Original Poster
Rep: Reputation: 15
Also can you tell me how I can have the new effects take place without restarting the computer ... as I am running a server machine and I dont want to restart it
 
Old 03-27-2006, 05:58 AM   #7
sharp81
Member
 
Registered: Mar 2005
Posts: 79

Original Poster
Rep: Reputation: 15
I dwld the tomcat version 5.5.16 binary ... but I dont know how to install it ... there is no make to install the file ....
 
Old 03-27-2006, 06:01 AM   #8
rahulk
Member
 
Registered: Mar 2006
Posts: 110

Rep: Reputation: 16
hi,

well I think you are missing some points here.

firstly, /etc/profile is a file which is used whenever a user logs into the system on his account.

shell invocation for /etc/profile happens as soon as the /bin/login of /etc/passwd authenticates the user (anyone including root). afterwards, .bashrc, .bash_profile follows.

Once you make the changes, simply log out of root user and on re-login the profile file would be re-read. You just have to make sure that you need to re-login to call the script. Again, I suggest you to try install the newer JDK and test out the java version. I am having three JDKs instalkled and have it working for three different users. Just make sure that the /etc/bashrc does not define the PATH variable as it will bypas any modification in .bash_profile.

the changes should work. Its all about knowing which is being called last.

-Rahul.
 
Old 03-27-2006, 08:05 AM   #9
sharp81
Member
 
Registered: Mar 2005
Posts: 79

Original Poster
Rep: Reputation: 15
I tried logging out and logging in .. but still the $JAVA_HOME points to the old version but the JAVA_BINDIR is correctly pointing to the new one ... dont know why this is happening
 
Old 03-27-2006, 09:12 PM   #10
rahulk
Member
 
Registered: Mar 2006
Posts: 110

Rep: Reputation: 16
Post

there must be an /etc/environment file which runs at the beginning just before /etc/profile.

Alternatively, in case the environment file is not present there could be /etc/profile.d directory which contains various shell scripts for bash and other shells.

Just change the line present in java_**.sh like java_sdk.sh or java_jre.csh and properly replace the older version with this new one. Afterwards just log in to any user and try echo $JAVA_HOME

one more thing $JAVA_HOME is a standart variable in Linux, JAVA_BINDIR must be customery variable. I am sure you will find the solution to your problem in /etc/profile.d directory

enjoy
Rahul.
 
Old 03-28-2006, 07:55 AM   #11
sharp81
Member
 
Registered: Mar 2005
Posts: 79

Original Poster
Rep: Reputation: 15
Thank you very much Rahul .... I found the problem .... It was the .bashrc file that needed to be chnaged for the effects to take place ...

Sharp
 
Old 03-28-2006, 07:56 AM   #12
sharp81
Member
 
Registered: Mar 2005
Posts: 79

Original Poster
Rep: Reputation: 15
And btw do you know anything about zope
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use JDK in linux Manoj Walia Linux - Software 3 04-08-2005 04:22 AM
Tomcat 5.0.27 connecting to Apache 2 with jdk 1.2.6 yea420 Linux - Newbie 0 08-13-2004 07:21 PM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM
how to use Jdk 1.3.1 in RH 9 Egyptian_Isis Linux - Newbie 1 11-06-2003 04:15 AM
Why use Apache with Tomcat rather than just Tomcat itself? davee Linux - Software 1 08-21-2003 09:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration