Install the new jdk-linux Enterprise Application-Linux server application on a Linux system with jdk. For more information, see. Today I encountered such a problem. I have no root permission for a linux server. The built-in JDK is installed on the server, and JDK is to be installed on the server. I copied the jdk1.5 directory and all the files in it to the server, and then in. the JAVA_HOME path classpath environment variable is set in the bash_profile file. However, when I use java-version to view the version number, the version information of 1.4 is displayed. I went back and checked the environment variable configuration. No problem, but the version 1.5 is not displayed.
So I put the $ path section in the path environment variable setting at the end of the path I set, and re-log on to it. The java-version still displays the version 1.4 information. I do not have the root permission yet. What should I do ?!
Then I made some attempts but failed. Later, I suddenly noticed that an export PATH export is already in front of my custom environment variable in the. bash_profile file. Ah, maybe this is the problem. So I deleted the previous export PATH and changed it to the last export. This time, java-version, haha, still has no 1.5 information.
However, no 1.4 message is displayed, but the java access is denied. It seems that this access is no longer the original java file, so I checked the java file under the bin directory in my jdk and understood it at a glance, without the executable permission. Therefore, all the files in this directory are added with the executable permission chmod + x *. Now, log on again. Java-version again. This time, haha, the version information of 1.5 is displayed.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service