Start java environment variable configuration and eclipse configuration in Linux Utuntu

Source: Internet
Author: User
I recently want to verify whether the even talend component can run across Windows platforms. After a few twists and turns, the basic environment can be completed. Check whether there are too many solutions to the latest JDK and eclipse installation and configuration in the Linux environment, especially in Utuntu, and learn how to make a simple task to influence the confidence of a person. To solve the pain of beginners, I would like to share this small achievement with you. (In addition, although there is a way for Utuntu to find the eclipse Automatic Installation configuration in sourcelist, I think

I recently want to verify whether the even talend component can run across Windows platforms. After a few twists and turns, the basic environment can be completed. Check whether there are too many solutions to the latest JDK and eclipse installation and configuration in the Linux environment, especially in Utuntu, and learn how to make a simple task to influence the confidence of a person. To solve the pain of beginners, I would like to share this small achievement with you. (In addition, although there is a way for Utuntu to find the eclipse Automatic Installation configuration in sourcelist, it is better for beginners to do more operations)

1. jdk installation and java environment variable configuration

(1). download the latest jdk linux version, such as jdk-6u7-linux-i586.bin, and then execute the sh jdk-6u7-linux-i586.bin command at terminal (if there is no permission, add chmod + x jdk-6u7-linux-i586.bin first)

(2) decompress the package to the current directory. You can rename the folder or move it to another directory.

(3). Configure environment variables, similar to those in Windows.

Generally, three variables are configured:

-PATH: Specifies the command search PATH.
-CLASSPATH: Specifies the Class search path. dt. jar and tool. jar in the lib subdirectory under the jdk installation directory are set to CLASSPATH, and the current directory "."
-JAVA_HOME indicates the JDK installation directory.

In addition, there are three configuration methods (You need to log on again after completion ):

-Modify the/etc/profile file. All Users have the right to use these environment variables. You can use this method during development and use. Add the following content after the file, for more information about how to edit a file, see the following method:

JAVA_HOME =/usr/share/jdk1.5.0 _ 05
PATH = $ JAVA_HOME/bin: $ path classpath =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export JAVA_HOME
Export PATH
Export CLASSPATH

Note: Do not leave invalid characters (such as tabs) before each line. It doesn't matter if spaces exist)

-Modify the. bashrc file in the user directory. It can control the permission usage to the user level and add the following at the end of the file:

Set JAVA_HOME =/usr/share/jdk1.5.0 _ 05
Export JAVA_HOME
Set PATH = $ JAVA_HOME/bin: $ PATH
Export PATH
Set CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export CLASSPATH

-Directly set the variable in shell. Changing a shell will be ineffective, but it is only a temporary use. Run the following command:

Export JAVA_HOME =/usr/share/jdk1.5.0 _ 05
Export PATH = $ JAVA_HOME/bin: $ PATH
Export CLASSPATH =.: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar

(4) Compile a simple java class to verify whether the configuration is successful!

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.