Easy solution to Linux installation Eclipse method

Source: Internet
Author: User
Tags gtk

With the development of Linux, many people began to learn the Linux system, do you know Linux system? Are you an application of Linux systems? This article provides you with a detailed introduction to Linux installation Eclipse, which plays a role in learning Linux installation eclipse. The following is a complete introduction to Linux installation Eclipse.

1. Install Eclipse under Ubuntu
1.1 Building a Java development environment in Ubuntu
(1) Install the Ubuntu system, the installation is strongly recommended to connect to the Internet, it will automatically download the language pack, automatically loaded with wubi, pinyin, and will default to the Firefox browser set to Chinese.
(2) Configure Ubuntu Environment: Add source, update software information, upgrade kernel
You can refer to an article on the Internet:
Http://hi.baidu.com/myownroom/blog/category/Linux
$ sudo apt-get update
(3) Installing the JDK package
sudo apt-get install SUN-JAVA6-JDK
After about 20 minutes will prompt to install the JDK success information, this time you can in the shell into Java or javac to take a look at the display of the information displayed (here is the JDK version number, if the system comes with GDK, need to pay attention to), to prove that the JDK installation success.
(Setting Sun-java6-jre is not moving ...)
What to do? \ "OK \" option is clearly on, but the mad press ENTER did not respond ...
Online a check, press the TAB key, \ "OK \" Turn red, press ENTER again, OK)
The next task is to configure the JRE environment:
In Shell execution:
sudo update-alternatives--config java
Usually gives two or two more choices of paths
Select:/usr/lib/jvm/java-1.6.0-sun/jre/bin/java as your JRE
(4) It is recommended to install and install the browser Java plugin (not necessary):
Executing in the shell:
sudo apt-get install Sun-java6-plugin
1.2 Install eclipse under Ubuntu.
(1) to http://www.eclipse.org/downloads/, download the Eclipse for Linux version, the full name of the file after I download it:
Eclipse-java-galileo-sr1-linux-gtk.tar.gz
After decompression, you can view the root directory
(2) Put eclipse-sdk-3.2.1-linux-gtk.tar.gz this file in the/opt directory (with Root execution mv _ _ statement can be moved into the OPT folder)
(3) Enter/opt/in the shell, execute: TAR-ZXVF eclipse-sdk-4.2.1-linux-gtk.tar.gz statement, unzip the download file
(4) In the shell, go to the Eclipse directory, cd/opt/eclipse
Set file Eclipse execution: Chown-r root: Your user name eclipse
(5) Create a desktop Connection
sudo gedit/usr/share/applications/eclipse.desktop
Join the content below
[Desktop Entry] Encoding=utf-8 name=eclipse comment=eclipse SDK exec=/opt/eclipse/eclipse icon=/opt/eclipse/icon.xpm Terminal=false Type=application categories=application;development;
At this point in the top-left corner of the application menu add a \ "programming \"-->\ "eclipse\" menu, click to start Eclipse.
Tip: If you click the "Programming \"-->\ "eclipse\" menu prompt encoding error, on the desktop build a launcher to point to the Eclipse installation directory.
Reference URL: http://www.javaeye.com/topic/34636

2. Install eclipse under Redhat
Reference:
(1) http://collonn.javaeye.com/blog/436427
(2) http://hi.baidu.com/summerytyj/blog/item/58ca9801b 4cb78d3267fb579.html
Installing JDK on Redhat
The first step: if the original machine installed on the redhat, you need to first uninstall the Redhat comes with the JDK. Because newer versions of Eclipse may need to compare new JDK versions.
Rpm-qa | grep GCJ
#会列出一些东西如: JAVA-1.4.2-GCJ-COMPAT-1.4.2.0-27JPP and so on, we only delete packages containing Java strings
Rpm-e JAVA-1.4.2-GCJ-COMPAT-1.4.2.0-27JPP
#或者: Rpm-e--nodeps Java can also:
However, you may encounter some problems when you delete them, mainly related to the problem of dependent packages.
This can be removed from the package at the beginning of Java found in Applications->add and remove software.
Step Two: Install the JDK (either Eclipse C + + or Eclipse Java requires JDK)
Download the JDK for the corresponding operating system on the Sun official website.
There are generally two types of files in the format.
Step three: Install Eclipse.
Unzip the motor Eclipse executable file.
Fourth step: Add Eclipse icons on the desktop
(1) Writing 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/eclipse (This is the directory where the eclipse unzip the file)-vm/usr/java/(JDK installation folder)/bin/java-data ~/workspace &
Create Launch from Desktop:
(1) Entry derectory:/usr/share/applications/
(2) Gedit Eclipse.destop
[Desktop Entry] Encoding=utf-8 name=eclipsec++ type=application Terminal=false exec=/opt/eclipsec++/eclipse-vm/opt/jdk1.6.0_16/bin /java-data ~/workspacec++ icon=/opt/eclipsec++/icon.xpm categories=apllication;development;
(2) Right-click on the desktop, select Create Launcher, and select the. sh file written above. At this point, the eclipse executable appears on the desktop. Click to run.

3. Configure Tomcat
The first step:
Download the Eclipse Tomcat plugin:
Http://www.eclipsetotale.com/tomcatPlugin.html
Unzip the plugin and drop it into Eclipse's plugins directory.
Step Two:
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| [Java EE. 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
has 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: Unable to execute binary file
$ 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 don't know how to solve it,the quit.
But I still can develop the 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 does 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) Select Web Project, right-click.
Run as, run on server
Choose tomcat5.0
Input website: \ "Http://localhost:8080/web/index.html\"
You'll find you have got much seccess!

(6) Add new servnet for the project:
Servlet, New
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.Htt Pservlet implements Javax.servlet.Servlet {/* (non-java-doc) * @see javax.servlet.http.httpservlet#httpservlet () */ Public HelloServlet () {super ();}/* (non-java-doc) * @see Javax.servlet.http.httpservlet#doget (Httpservletre Quest requ EST, httpservletresponse response) */protected void doget (HttpServletRequest request, httpservletresponse response) Throws Servletexception, IOException {response.getwriter (). Write (\ "Hello, world!\"),}/* (non-java-doc) * @see javax.se Rvlet.http.httpservlet#dopost (httpservletr equest request, httpservletresponse response) */protected void DoPost ( HttpServletRequest request, HttpServletResponse response) throws Servletexception, IOException {//TODO auto-generated m Ethod sTub}}
Restart the Eclipse,and run on server,
Input Web site:\ "Http://127.0.0.1:8080/web/hellowervlet\"
You'll see:
Hello, world!.

This is how you learned to install Eclipse Linux.

Easy solution to Linux installation Eclipse method

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.