Skip to Main Content Skip to Search
Product Documentation

Installing Third-Party Software for Eclipse

Installing Sun Java Runtime Environment (JRE)

To install the JRE, complete the following steps:

  1. At your Windows or Linux command prompt, enter:

    java -version

    If Java is present, the command line responds with the version information, as this example shows.

  2. If Java is missing or the version is lower than 1.6.x, download and install JRE 6.0 from http://www.java.com.

  3. Get the path of the Java JRE by entering which java on the command line.

  4. Set the PATH system variable in your operating system.

    For example, in Windows 7:

    1. Press the Windows key and search for "System environment variables" and open "Edit the system environment variables".

    2. In System Properties, to go Advanced and click Environment Variables.

    3. In the System variables, locate and select "Path".

    4. Click the Edit button and add the path of the Java JRE to the Variable value.

      For example , add C:\Program Files\Java\jre6\bin; to the Variable value.

    5. Click OK to save your changes.

    For example, with Linux:

    1. Open a startup file, such as ~/ .cshrc.

    2. Add the path of the Java JRE to the PATH variable.

      For example, on a 64-bit Linux host computer, if you are using csh or tcsh, enter:

      setenv PATH $PATH:/local/MATLAB/R2011b/sys/java/jre/glnxa64/jre/bin

      For example, on a 64-bit Linux host computer, if you are using sh, ksh, or bash, enter:

      PATH=$PATH:/local/MATLAB/R2011b/sys/java/jre/glnxa64/jre/bin ; export PATH
    3. Save your changes and close the file.

    For more information, see http://www.java.com/en/download/help/path.xml.

  5. Verify that Java is working by entering java -version again or by visiting http://www.java.com/en/download/help/testvm.xml.

Installing Eclipse IDE for C/C++ Developers

The Eclipse IDE for C/C++ Developers package includes the Eclipse IDE and the C/C++ Development Tools (CDT). To install Eclipse IDE for C/C++ Developers package, complete the following steps:

  1. Download the Ganymede SR2 zip file for Eclipse IDE for C/C++ Developers, from http://www.eclipse.org/downloads/packages/release/ganymede/sr2.

  2. Extract the Eclipse files to a permanent location, such as C:\eclipse\ and create a desktop shortcut to eclipse.exe.

  3. Start Eclipse, and select Help > Software Updates.

  4. Look under the Installed Software tab, and verify that Eclipse has the following three CDT software packages.

    • Eclipse C/C++ Development Platform

    • Eclipse C/C++ Development Tools

    • Mylin Bridge: C/C++ Development

If you have a previous Eclipse installation that does not include CDT, complete the following steps:

  1. In Eclipse, select Help > Software Updates.

  2. Click the Available Software tab.

  3. Click Ganymede Update Site.

  4. Select C and C++ Development, and click Install.

  5. When the installation process completes, click the Installed Software tab, and verify that you have CDT.

Verifying the GNU Tool Chain on Linux

Most Linux distributions include the following GNU C/C++ development tools. Eclipse and CDT require these tools to compile code, build projects, and debug applications:

Verify that the GNU tools are present and set the tool chain path:

  1. On the Linux command line, enter:

    • gcc --version

    • gdb --version

    • as --version

    • ar --version

    • make --version

  2. Compare the version of each tool with the following list of tested versions:

    • gcc 4.4

    • as 2.18

    • ar 2.18

    • gdb 6.8.x

    • make 3.81

    If you are using Eclipse for targeting embedded Linux, disregard the version numbers in the preceding list.

    To install a missing tool or to change the version of the tool, use the software installation manager that comes with your Linux distribution.

    Alternatively, visit http://directory.fsf.org/GNU/ for more information about individual tools. Source files for the tools are available from:

  3. Modify the PATH environment using the right commands for your running shell. You can also modify the path environment variable in your login scripts.

    If you are using a Bash shell prompt, enter:

    PATH=my_tool_path:$PATH

    Where my_tool_path is the path to the GNU tool binaries. For example:

    PATH=/bin:$PATH

    If you are using a C shell prompt, enter:

    setenv PATH my_tool_path:$PATH

    Where my_tool_path is the path to the GNU tool binaries. For example:

    setenv PATH /bin:$PATH

Installing the GNU Tool Chain on Windows

Windows typically does not include GNU C/C++ development tools. Eclipse and CDT require these tools to compile code, build projects, and debug applications.

Provide a GNU tool chain for Windows by installing MinGW:

  1. Open http://sourceforge.net/projects/mingw/files/.

  2. Download and run the latest version of the "Automated MinGW Installer".

      Note   The earliest version of MinGW available is more recent than the tested version.

  3. Start the MinGW installation wizard to perform a default installation.

    Perform a default installation until you reach Select Components. At that step, select MSYS Basic System.

    Then, complete the default installation process. Wait for the installation wizard to download, and install additional files from the Internet.

      Note   If you alter the default installation path, C:/MinGW, do not use spaces in the new path.

Set the PATH environment variable:

  1. In Windows, right-click My Computer or Computer, and choose Properties.

  2. Then select Advanced or Advanced system settings, and click Environment Variables.

  3. Under System variables, scroll down to the Path variable.

  4. Select Path, and click Edit.

  5. Configure the operating system to the GNU tools when there are multiple paths:

    1. Add the paths of the MinGW and MSYS bin folders to the beginning of the Variable value.

    2. Use semicolons to separate the paths. For example, C:\mingw\bin;C:\mingw\msys\1.0\bin;

  6. To verify the GNU tools installation and path settings, enter the following commands on the Windows command line:

    • gcc --version

    • gdb --version

    • as --version

    • ar --version

    • make --version

    Each command displays the tool name and version on the command line. If you receive a message that the command is not recognized, verify that you completed the preceding installation and path configuration instructions.

    You can use versions of the GNU tools that are more recent than the tested versions at your own risk.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS