Before installing eclipse in Ubuntu, you must first like "Linux" in Debian configuration JDK1.7, and Linux Java Helloworld " (Click to open the link) now the Ubuntu JDK1.7, the entire installation process is even more simple than the Debian, the installation process, the use of the file dragged into the terminal, so as not to enter such a long path. The only difference between Ubuntu and Debian is the execution of commands you have to make a sudo in front of you, which means to execute this command as root user.
I. Download and installation of Eclipse
1. First, download the latest version of Luna sr2http://www.eclipse.org/downloads/packages/release/luna/on the Eclipse website SR2 (click the Open link) to download the latest version of the Eclipse for Java EE Linux 32bit/64bit,eclipse version is not very different, and the eclipse for Java EE also contains Java EE and the content. It is easy to write Java EE later without having to add another plugin.
2, the next good, or throw eclipse-jee-luna-sr2-linux-gtk.tar.gz to that, the machine restarts the content will disappear the/tmp folder, so as to avoid installing the installation files to delete themselves.
3, open the terminal, directly enter the following command:
sudo tar zxvf '/tmp/eclipse-jee-luna-sr2-linux-gtk.tar.gz '-c/usr/lib
Wait for a round of decompression.
Here, essentially eclipse is installed. Eclipse is a green version of any system and must be liked by Eclipse.
However, to make it easier for us to use, we still need to enter the following instructions to create a desktop shortcut for Eclipse, first to configure the shortcut for Eclipse in the/usr/share/applications/directory.
4, in the terminal input:
$ sudo gedit/usr/share/applications/eclipse.desktop
The warning of the terminal is ignored, in the popup text editor input:
[Desktop Entry] Type=applicationname=eclipsecomment=eclipse Integrated Development environmenticon=/usr/lib/eclipse/icon.xpmexec= /usr/lib/eclipse/eclipseterminal=falsecategories=development;ide; Java;
Then save the rollout.
5, then we open the file system, to the following/usr/share/applications/to find the Eclipse icon, right-click, copied to the desktop, at this time, the eclipse's shortcut is created.
Second, the use and HelloWorld of Eclipse
1, directly to open the desktop eclipse, completely with Windows is a look.
2, the initial launch it will let you set the working directory, then set it, according to the default working directory is OK. You asked me to choose another directory I wouldn't have chosen. Then tick, set it as the default working directory, no longer prompt.
You can then find this working directory in the file system's home folder. The Java project you created is here.
3. After closing the Welcome page, although it is suggested that this is the working environment of Java EE, it does not need to be ignored. Right-click the workspace and create a new project, such as:
4. Select Java Project
5, after entering the name, remember to choose the JDK1.7 we just installed, do not use the default JDK, lest such a problem.
6, the next step, do not hurry to finish, in order and export an item, also just installed JDK1.7 selected, and then point to complete.
7. Right-click the newly created Java project to create a new class, the Java file.
8, write a good name, at the same time the creation of the main function hook, do not have to write our own.
9, through the same as the Windows shortcut key CTRL + SPACE to set the input method of Linux, and then make a sentence to print "Hello, the World" SYSTEM.OUT.PRINTLN Java statement, click on the top of the run, you will see the results of the run. This is exactly the same as eclipse under Windows.
"Linux" Installs Eclipse and HelloWorld in Ubuntu