How to install Eclipse in Linux

Source: Internet
Author: User

With the development of Linux, many people begin to learn about Linux. Do you know about Linux? Are you an application of Linux? This article describes how to install Eclipse in Linux, which plays a certain role in learning how to install Eclipse in Linux. The following describes how to install Eclipse in Linux.

1. Install Eclipse in ubuntu
1.1 build a java Development Environment in Ubuntu
(1) install the Ubuntu system. We strongly recommend that you connect to the Internet when installing Ubuntu. It will automatically download the Language Pack, automatically install five strokes, splice audio, and set the firefox browser to Chinese by default.
(2) configure the Ubuntu environment: add the source, update the software information, and upgrade the kernel.
Refer to an article on the Internet:
Http://hi.baidu.com/myownroom/blog/category/Linux
$ Sudo apt-get update
(3) install the jdk Software Package
Sudo apt-get install sun-java6-jdk
After about 20 minutes, you will be prompted for successful jdk installation. At this time, you can enter java or javac in the shell and check that the displayed information displays the jdk version number, if the system comes with gdk, note that) to prove that jdk has been installed successfully.
Setting the sun-java6-jre does not move ......
What should I do? The \ "OK \" option is clearly displayed, but it does not respond when you press enter ......
Check the network, press the tab key, \ "OK \" becomes red, then press enter, OK)
The next step is to configure the JRE environment:
Run the following command in shell:
Sudo update-alternatives -- config java
Two or more paths are usually provided.
Select/usr/lib/jvm/java-1.6.0-sun/jre/bin/java as your JRE
4) install and install the browser Java Plug-in (not necessary ):
Run the following command in shell:
Sudo apt-get install sun-java6-plugin
1.2 install eclipse in ubuntu.
1) download the eclipse for linux version at http://www.eclipse.org/downloads/. the complete name of the downloaded file is:
Eclipse-java-galileo-SR1-linux-gtk.tar.gz
After decompression, you can view
(2)put eclipse-sdk-3.2.1-linux-gtk.tar.gz in the/opt directory and run the mv _ statement as root to move it to the opt folder)
(3) In the shell to enter/opt/, execute: tar-zxvf eclipse-SDK-4.2.1-linux-gtk.tar.gz statement, 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
Add the following content
[Desktop Entry] Encoding = UTF-8 Name = Eclipse Comment = Eclipse SDK Exec =/opt/eclipse Icon =/opt/eclipse/icon. xpm Terminal = false Type = Application Categories = Application; Development;
At this time, an \ "programming \" --> \ "eclipse \" menu will be added to the Application menu in the upper left corner, and you can click to start eclipse.
Tip: If the Encoding Error is displayed when you click \ "programming \" --> \ "eclipse \", you can create a starter on the desktop to point to the eclipse installation directory ..
Reference: http://www.javaeye.com/topic/34636

2. Install Eclipse under Redhat
Refer:
1) http://collonn.javaeye.com/blog/436427
Http://hi.baidu.com/summerytyj/blog/item/58ca9801b 4cb78d3267fb579.html
Install jdk on RedHat
Step 1: If RedHat is installed on the original host, you must first uninstall the JDK that comes with RedHat. Because a newer version of eclipse may require a newer jdk version.
Rpm-qa | grep gcj
# Will list some things such as: java-1.4.2-gcj-compat-1.4.2.0-27jpp, etc, we only delete software packages containing java strings
Rpm e java-1.4.2-gcj-compat-1.4.2.0-27jpp
# Or: rpm-e -- nodeps java:
However, some problems may occur during such deletion, mainly related to dependency packages.
You can find the package starting with java in Applications-> Add and Remove Software to delete it.
Step 2: Install jdk. jdk is required for both eclipse c/c ++ and eclipse java)
Download the jdk of the corresponding operating system from the sun official website.
Generally there are two formats of files.
Step 3: Install eclipse.
Decompress the eclipse executable file of the motor.
Step 4: add the eclipse icon on the desktop
1) Compile the. sh File
Export JAVA_HOME =/usr/java/jdk installation folder)
Export PATH = $ JAVA_HOME/bin: $ PATH
CLASSPATH =.:/usr/java/j2sdk1.4.2 _ 01/lib/tools. jar: $ CLASSPATH
Export CLASSPATH
Opt/eclipse this is the directory of the eclipse decompression file)-vm/usr/java/jdk installation folder)/bin/java-data ~ /Workspace &
Create launch from desktop:
(1) entry derecloud:/usr/share/applications/
(2) gedit eclipse. destop
[Desktop Entry] Encoding = UTF-8 Name = export sec ++ Type = Application Terminal = false Exec =/opt/export sec ++/eclipse-vm/opt/jdk1.6.0 _ 16/bin/java -data ~ /WorkspaceC ++ Icon =/opt/export sec ++/icon. xpm Categories = Apllication; Development;
2) Right-click on the desktop, select create launcher, and select the. sh file written above. At this time, the eclipse executable file will appear on the desktop. Click to run.

3. Configure tomcat
Step 1:
Download the eclipse tomcat plug-in:
Http://www.eclipsetotale.com/tomcatPlugin.html
Decompress the plug-in and place it in the eclipse plugins directory.
Step 2:
Download tomcat:
Http://tomcat.apache.org/
Restart eclipse to see the tomcat icon.

4. MySQL:
Download address:
Http://dev.mysql.com/downloads/
Access denied (java. util. PropertyPermission catalina. home read
Window-> Preferences-> Tomcat
Advanced-> Launch Tomcat Using Sacrity Manager (don not choose)

5. MyEclipse:
Download wensite:
Http://www.verycd.com/topics/2741105/
Ed2k: // | file | [J2EE. Integrated Development Environment]. TLF-SOFT-MyEclipse.Enterprise.Workbench.v7.1.1-R iFT. nfo | 3943 | 1bb19755c5394a0fd8ff7592ca909d04 | h = JBB AC3WAD444UT3MP2RURLNVMZXQLFEQ |/
Reference: http://blog.sina.com.cn/s/blog_45fd882f0100cjsx.ht ml
Have downloaded the MyEclipse, I input
$ Sudo chmod 777 MyEclipse. Enterprise. Workbench. v7.1.1.LINUX. X86-Ri FT. bin
$./MyEclipse. Enterprise. Workbench. v7.1.1.LINUX. X86-RiFT. bin
Bash:./MyEclipse. Enterprise. Workbench. v7.1.1.LINUX. X86-RiFT. bin: the binary file cannot be executed.
$ Sh MyEclipse. Enterprise. Workbench. v7.1.1.LINUX. X86-Ri FT. bi n
MyEclipse. Enterprise. Workbench. v7.1.1.LINUX. X86-Ri FT. bin: 1: Syntax error: \ "& \" unexpected (expecting \")\")
I do not know how to solve it, the quit.
But I still can develop web applications on eclipse.

6. Start Web Development
Reference: http://cwiki.apache.org/WW/setting-up-eclipse-with-tomcat.html

(1) Help-> Install new software
-> Available Software
Input the website: \ "http://download.eclipse.org/releases/galileo \"
Choose \ "WEB, XML, Java EE Development \"
The plugin can help create web applications, including JavaScript, XML, XSL, XSD, HTML, XHTML, CSS, JSP, EJBs, Webservices, and JPA tools

2) define server:
New-> server
Tomcat 5.0
(It do not support for tomcat 5.5 and 6.0, so I can just use tomcat 5.0)

(3) restart the eclipse
New-> project
Input: \ "web \"
Choose \ "Dynamic Website \"

(4) add new html to \ "web \" project
<! DOCTYPE html PUBLIC \ "-// W3C // dtd html 4.01 Transitional // EN \" \ "http://www.w3.org/TR/html4/loose.dtd\">

(5) Right-click the web Project.
Run as-> Run on server
Choose tomcat5.0
Input website: \ "http: // localhost: 8080/web/index.html \"
You will find you have got much seccess!

(6) add new servnet for the project:
New-> servlet,
Name: helloservlet
Import java. io. IOException; import javax. servlet. servletException; import javax. servlet. http. httpServletRequest; import javax. servlet. http. httpServletResponse;/*** Servlet implementation class for Servlet: HelloServlet **/public class helloservlet extends javax. servlet. http. httpServlet implements javax. servlet. servlet {/* (non-Java-doc) * @ see javax. servlet. http. httpServlet # HttpServlet () */pu Blic helloservlet () {super ();}/* (non-Java-doc) * @ see javax. servlet. http. httpServlet # doGet (HttpServletRe quest request, HttpServletResponse response) */protected void doGet (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {response. getWriter (). write (\ "Hello, world! \ ");}/* (Non-Java-doc) * @ see javax. servlet. http. httpServlet # doPost (HttpServletR equest request, response) */protected void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {// TODO Auto-generated method stub }}
Restart the eclipse, and run on server,
Input web site: \ "http: // 127.0.0.1: 8080/web/hellowervlet \"
You will see:
Hello, world!

In this way, you have learned how to install Eclipse in Linux.

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.