Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 ....
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.
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 ..
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
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.
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.