Thứ Sáu, 28 tháng 12, 2012

Thêm Eclipse 3.8.1 vào Desktop Entry cho Ubuntu

Eclipse is a very popular IDE for almost all purposes. Although the Ubuntu Software Center lets you install Eclipse with one click, many users like to do a manual installation instead. Also, at the time of this post, the Software Center still offers Eclipse 3.8.1, so if you want to install an up-to-date version, you have to choose the manual way. This is how it's done:

  • Make sure you have installed a Java JDK (search for "java" in the Software Center).
  • Download an Eclipse SDK archive that fits your machine's architecture (x86 for 32 bit, x86_64 for 64 bit).
  • Navigate to the downloaded archive and extract it. You should get a folder named "eclipse".
  • Open a terminal and type "sudo mv /path/to/eclipse /opt" and enter your password when prompted. Now the extracted folder is moved to your system-wide /opt folder.
  • Final Step: creating a desktop shortcut. Type: 
  • sudo gedit /usr/share/applications/eclipse.desktop
  • Enter your password when prompted. An editor window is opened. Insert the following:
[Desktop Entry]
Name=Eclipse 3.8
Comment=Java IDE
Exec=/opt/eclipse/eclipse
Icon=/opt/eclipse/plugins/org.eclipse.sdk_3.8.1.v201209141540/eclipse256.png
Type=Application
Categories=Development


Save the file and exit the editor. Now you can start eclipse using the dash.
You can install other versions the same way, just download the archive you want. For example, the current official version 4.2 is available under http://www.eclipse.org/downloads/. I prefer the 3.x series, as it is less resource-hungry and responds quicker. You even can have two or more versions of Eclipse at the same time, as each installation only operates inside its folder. Just remember to rename the install folders accordingly.

0 nhận xét:

Đăng nhận xét