Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The configuration method of installing JDK and Eclipse under Linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "the configuration method of installing JDK and Eclipse under Linux". In the daily operation, I believe that many people have doubts about the configuration method of installing JDK and Eclipse under Linux. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "installing JDK and Eclipse under Linux". Next, please follow the editor to study!

First, install the Java development environment

1jdkmuri 6u33Mui586. Bin, the original directory after download is: / home/Downloads/

2. Put the downloaded file where you need it, and I will put it here

Cp jdk-6u33-linux-i586.bin / usr/share/JavaJDK

Note: usr: it is unix software resoure. It mainly places some commonly used software.

3. Cd / usr/share/JavaJDK changes the file permissions so that it can run:

Sudo chmod upright x jdk-6u33-linux-i586.bin

Note: chmod is used to change file permissions. Since the file you just downloaded cannot be executed by default, you have to add it.

4. Run the file: sudo. / jdk-6u33-linux-i586.bin, so far

Note: the suffix name .bin can be run directly.

/ usr/share/JavaJDK

Under the directory is a bin package, jdk1.6.0_37, and an unzipped folder with the same name.

5, in the terminal, enter:

Sudo gedit / etc/environment

Add the following at the end of the file:

Export JAVA_HOME=/usr/share/JavaJDK/jdk1.6.0_33

Export JRE_HOME=/usr/share/JavaJDK/jdk1.6.0_33/jre

Export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib

6. Configure the jdk environment variable in profile:

Sudo gedit / etc/profile

And add the following lines at the end:

# set java environment

Export JAVA_HOME=/home/apple/JavaIDETools/JavaJDK/jdk1.6.0_31

Export JRE_HOME=/home/apple/JavaIDETools/JavaJDK/jdk1.6.0_31/jre

Export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib

Export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin

7, log out of the user, and then type java-version in the terminal to try

Remember to log out before logging back in to the user

Second, install Eclipse:

Download from the official website: eclipse-java-galileo-SR1-linux-gtk.tar.gz

After unzipping, you can view the

(2) put the file eclipse-SDK-3.2.1-linux-gtk.tar.gz under the / opt directory (execute the mv _ _ statement with root to move to the opt folder)

Note: opt is generally used to store third-party software, so it is recommended to put it here.

(3) enter / opt/, execution in shell:

Tar-zxvf eclipse-java-juno-SR1-linux-gtk.tar.gz statement to extract the download file

(4) in shell, go to the eclipse directory, cd / opt/eclipse

Set file eclipse execution right: chown-R root: your user name eclipse

(5) create a desktop connection

Sudo gedit / usr/share/applications/eclipse.desktop

Enter the following code:

[Desktop Entry]

Name=Eclipse

Comment=Eclipse IDE

Exec=/home/fish/java/eclipse/eclipse

Icon=/home/fish/java/eclipse/icon.xpm

Terminal=false

Type=Application

Categories=Application;Development

At this point, the study of "the configuration method of installing JDK and Eclipse under Linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report