Difference between revisions of "Installing Eclipse"
Kyoungmeyer (talk | contribs) (→Next Steps) |
(Added information about java/jvm) |
||
Line 1: | Line 1: | ||
− | {{todo|Complete <strike>Make sure this is good for OE 4 </strike>(11.13.13-10:57->KY+);(11.14.13-16:25->MD+)|Michael Gloff|project=oe 4,mg,ky,md, Complete}} | + | {{todo|Complete <strike>Make sure this is good for OE 4 </strike>(11.13.13-10:57->KY+);(11.14.13-16:25->MD+);(02.27.13-17:50->MG+)|Michael Gloff|project=oe 4,mg,ky,md, Complete}} |
==Introduction== | ==Introduction== | ||
Line 25: | Line 25: | ||
Eclipse is a Java application and as such requires a Java Virtual Machine (JVM) to run. Several different JVM providers are available, including OpenJDK and Oracle Java. EMAC recommends installing OpenJDK version 6 or 7 to support the Eclipse 3.6 distribution. If you will not be doing any software development in the Java language, a Java Runtime Environment (JRE) is sufficient. Otherwise, you will need to install a Java Development Kit (JDK). See the [http://openjdk.java.net/ OpenJDK ] or [http://www.oracle.com/technetwork/java/javase/downloads/index.html Oracle ] website for installing either the JVM or JDK. | Eclipse is a Java application and as such requires a Java Virtual Machine (JVM) to run. Several different JVM providers are available, including OpenJDK and Oracle Java. EMAC recommends installing OpenJDK version 6 or 7 to support the Eclipse 3.6 distribution. If you will not be doing any software development in the Java language, a Java Runtime Environment (JRE) is sufficient. Otherwise, you will need to install a Java Development Kit (JDK). See the [http://openjdk.java.net/ OpenJDK ] or [http://www.oracle.com/technetwork/java/javase/downloads/index.html Oracle ] website for installing either the JVM or JDK. | ||
− | Installation instructions will vary widely depending on the Linux distribution used on the development system. Most distributions, including Ubuntu and Debian, have standard packages available for OpenJDK on the distribution's software repositories. For example, to install OpenJDK6 JRE on Ubuntu or Debian | + | Installation instructions will vary widely depending on the Linux distribution used on the development system. Most distributions, including Ubuntu and Debian, have standard packages available for OpenJDK on the distribution's software repositories. For example, to install OpenJDK6 JRE on Ubuntu or Debian run: |
+ | <syntaxhighlight lang=bash> | ||
+ | developer@ldc:~$ sudo apt-get install openjdk-6-jre:i386 | ||
+ | </syntaxhighlight> | ||
+ | For the JDK, install the <code>openjdk-6-jdk:i386</code> package instead of the JRE. | ||
Refer to the documentation for your distribution for more information on how to install Java for your platform. | Refer to the documentation for your distribution for more information on how to install Java for your platform. | ||
Line 53: | Line 57: | ||
=== Execute Eclipse === | === Execute Eclipse === | ||
+ | |||
+ | Eclipse requires that the JVM to use be specified in <code>eclipse/eclipse.ini</code>. By default the <code>-vm</code> option is set to <code>/usr/lib/jvm/java-6-openjdk-i386/jre/bin/java</code>. Ensure that this is set to the correct path for the JVM provider and JVM version in use. | ||
If the "non-Qt version" of the SDK is installed, simply run the <code>eclipse</code> executable in the extracted directory to start Eclipse as shown below: | If the "non-Qt version" of the SDK is installed, simply run the <code>eclipse</code> executable in the extracted directory to start Eclipse as shown below: |
Revision as of 18:50, 27 February 2014
Contents
Introduction
The instructions below detail the steps to install Eclipse on to a linux PC. Before beginning the installation of Eclipse, it is important to ensure that you have the necessary tools. These tools can either be command line interface (CLI) or graphical programs. This guide provides instructions for both options.
Table 1: Conventions | |
---|---|
/download/directory/ |
Placeholder indicating the directory to which the SDK archive will be downloaded. |
/install/directory/ |
Placeholder indicating the directory to which Eclipse will be extracted. EMAC recommends
that this directory be located somewhere within the development user's home directory. |
Required Tools
- Web browser or other FTP-aware client
- Archiving tool. Two options are available:
- Graphical: Ark for KDE, File Roller for GNOME
- CLI: Tar is standard
Procedure
Install Java
Eclipse is a Java application and as such requires a Java Virtual Machine (JVM) to run. Several different JVM providers are available, including OpenJDK and Oracle Java. EMAC recommends installing OpenJDK version 6 or 7 to support the Eclipse 3.6 distribution. If you will not be doing any software development in the Java language, a Java Runtime Environment (JRE) is sufficient. Otherwise, you will need to install a Java Development Kit (JDK). See the OpenJDK or Oracle website for installing either the JVM or JDK.
Installation instructions will vary widely depending on the Linux distribution used on the development system. Most distributions, including Ubuntu and Debian, have standard packages available for OpenJDK on the distribution's software repositories. For example, to install OpenJDK6 JRE on Ubuntu or Debian run:
developer@ldc:~$ sudo apt-get install openjdk-6-jre:i386
For the JDK, install the openjdk-6-jdk:i386
package instead of the JRE.
Refer to the documentation for your distribution for more information on how to install Java for your platform.
Once Java has been installed, test the installation by verifying that the java command executes properly and reports the expected version:
developer@ldc:~$ java -version
Install Eclipse
- Download the Eclipse 3.6 distribution from the EMAC ftp site.
- Uncompress:
Using a graphical archiving tool: Uncompress the archive to the chosen development directory. EMAC strongly recommends that/install/directory/
is located somewhere within the developer's home directory. For assistance with extracting the archive, please see the documentation for your archiving tool.
Using tar
from the CLI: The tar utility has the ability to both compress and extract archives. Here, the x flag is used to tell tar to extract.
developer@ldc:~$ cd /install/directory
developer@ldc:~$ tar xjvf /download/directory/eclipse-3.6-Linux_EMAC-rc0.tar.bz2
developer@ldc:~$ ls
The list of extracted files will be output to the screen. This may take a minute.
...
eclipse/
...
Execute Eclipse
Eclipse requires that the JVM to use be specified in eclipse/eclipse.ini
. By default the -vm
option is set to /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java
. Ensure that this is set to the correct path for the JVM provider and JVM version in use.
If the "non-Qt version" of the SDK is installed, simply run the eclipse
executable in the extracted directory to start Eclipse as shown below:
developer@ldc:~$ /install/directory/eclipse/eclipse
If the "Qt version" of the SDK is installed, Eclipse will need to be run using the emac-eclipse
script included in the SDK. For example, if the SDK for the system is located at /install/directory/EMAC-OE-arm-linux-gnueabi-SDK_4.0
, Eclipse could be started with the following command:
developer@ldc:~$ /install/directory/EMAC-OE-arm-linux-gnueabi-SDK_4.0/emac_eclipse
Add Eclipse to PATH
Writing /path/to/eclipse/eclipse
each time to start Eclipse can become tedious. By adding the path to the Eclipse executable to the system path variable ensures that Eclipse can be started from within any directory on the system.
For "non-Qt version":
developer@ldc:~$ echo 'export PATH=$PATH:/home/developer/eclipse' >> ~/.bashrc
For "Qt version":
developer@ldc:~$ ln -s /home/developer/EMAC-OE-arm-linux-gnueabi-SDK_4.0/emac_eclipse eclipse
developer@ldc:~$ echo 'export PATH=$PATH:/home/developer/EMAC-OE-arm-linux-gnueabi-SDK_4.0' >> ~/.bashrc
Next Steps
After completing the installation, continue by starting Eclipse for the first time.