Ubuntu12.10 complete JDK/chromejre environment configuration tutorial

Source: Internet
Author: User
In my opinion, Linux is suitable for serving as a server. Like Windows, it has a public face and is favored by many people. It is based on the mass market & rdquo; grass-roots & rdquo; the building is suitable. At first, I installed Ubuntu with a try-on mentality. After two days, I found that the Ubuntu Desktop version is more interesting than Win8, and unexpected things are even more exciting, with a lot of software, I can really feel the idea of free sharing, open-source and ad-free interest, and I cannot tell the overall feeling. One word: & rdquo; Shuai & rdquo ;,

In my opinion, Linux is suitable for serving as a server. For example, Windows has a public face and is favored by the masses. It is more appropriate to go to the mass market to build a "grass-roots" architecture. At first, I installed Ubuntu with a try-on mentality. After two days, I found that the Ubuntu Desktop version is more interesting than Win8, and unexpected things are even more exciting, with a lot of software, I can really feel the idea of free sharing, open source without advertisement, and I can't tell the overall feeling. One word: "handsome", two words: "handsome ". Now we have installed a win8 and Ubuntu 12.10, but basically we don't need Win8. below we record the two configuration processes of java and the use of AlwaysOnPC:

1. Install JDK * .tar.gz
1. Go to the official Oracle website and go to JDK: release.
2. Move the downloaded jdk-7u9-linux-x64.tar.gz file to the installation directory. I will directly put it in the/usr directory.
3. Switch to the/usr directory cd/usr
Decompress jdk:
Sudo tar-zxvf jdk-7u9-linux-x64.tar.gz
4. OK. Configure the environment variable sudo gedit/etc/profile.
5. Add the following content to the/etc/prifile file (Note: here the JDK path is changed to your own installation path ):
6. export JAVA_HOME =/usr/jdk1.7.0 _ 09
Export JRE_HOME =/usr/jdk1.7.0 _ 09/jre
Export PATH = $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin: $ PATH
Export CLASSPATH = $ CLASSPATH:.: $ JAVA_HOME/lib: $ JAVA_HOME/jre/lib
7. Make the modified/etc/profile take effect immediately./etc/profile
8. modify the system's default JDK and make it take effect immediately (Note: change to your own path. If you want to install myeclipse, this step is required; otherwise, an error will occur ): sudo update-alternatives -- install "/usr/bin/java" "java" "/usr/jdk1.7.0 _ 09/bin/java" 300
Sudo update-alternatives -- install "/usr/bin/javac" "javac" "/usr/jdk1.7.0 _ 09/bin/javac" 300
Sudo update-alternatives -- install "/usr/bin/javaws" "javaws" "/usr/jdk1.7.0 _ 09/bin/javaws" 300
Sudo update-alternatives -- config java
Sudo update-alternatives -- config javac
Sudo update-alternatives -- config javaws
1. OK. After the operation is completed, use java-version to view the effect. If it is the JDK we just installed, it will be said... You know!


Jdk_1.7.0.09.tar.gz is configured successfully!

2. Tips for running commands in Java: java-jar *. jar // run the compiled. jar file.
Javac *. java // compile the. java File
Javaws *. jnlp // run the. jnlp File

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.