LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   jdk and tomcat (http://www.linuxquestions.org/questions/linux-software-2/jdk-and-tomcat-428335/)

sharp81 03-25-2006 08:01 AM

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

pnellesen 03-25-2006 09:52 AM

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 :)

sharp81 03-27-2006 03:26 AM

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

rahulk 03-27-2006 03:32 AM

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.

sharp81 03-27-2006 03:51 AM

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 ..

sharp81 03-27-2006 03:52 AM

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

sharp81 03-27-2006 06:58 AM

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 ....

rahulk 03-27-2006 07:01 AM

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.

sharp81 03-27-2006 09:05 AM

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

rahulk 03-27-2006 10:12 PM

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 :cool:

enjoy
Rahul.

sharp81 03-28-2006 08:55 AM

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

sharp81 03-28-2006 08:56 AM

And btw do you know anything about zope


All times are GMT -5. The time now is 04:46 AM.