Eclipse and SVN Instructions

What is Eclipse?

In computer programming, Eclipse is an integrated development environment (IDE). It contains a base workspace and an extensible plug-in system for customizing the environment. Written mostly in Java, Eclipse can be used to develop applications.

What is SVN?

Subversion is an open source version control system. A version control system (also known as a Revision Control System) is a repository of files, often the files for the source code of computer programs, with monitored access.

For happiness, please read the below installation instructions carefully and fully. Missing an important note here can waste hours of your time. You can also visit office hours and use the course forums to get help.

Installing Eclipse on your machine

If you are interested in using Eclipse on your own machine, you can install it yourself. You need to install the Java JDK (described below) before you can use Eclipse.

Fall 2017: Installing the latest JDK

We strongly recommend you install the latest Java Development Kit (JDK) on your laptop, but anything after (and including) Java 6 JDK will work.

Note: The JDK ("Java Development Kit") includes a compiler and other developer tools, but the smaller JRE ("Java Runtime Environment") does not.

Installing the Eclipse IDE

Download the latest version of Eclipse for your operating system.

Note: A 32-bit version of Eclipse will require a 32-bit version of the JDK, and likewise for a 64-bit version of Eclipse.

Upon startup, you will be asked to select a workspace (i.e. a folder where all your projects are stored). Do not move Eclipse files once you've started Eclipse as Eclipse's internal configuration uses absolute paths.

Setting up Eclipse to work with SVN

You need to install some special software to make SVN and Eclipse cooperate with each other.
  1. Run Eclipse
  2. Go to Help >> Eclipse Marketplace...
  3. Type "subversive" into the Find field
  4. Click <Install> under "Subversive - SVN Team Provider 4.0.5"
  5. Tick only the checkbox for "Subversive SVN Team Provider (required)"
  6. After installing, you must restart Eclipse
  7. Close the Welcome window
  8. After restart, in Eclipse, go to Eclipse -> Help -> Install new software
  9. Work with: ""
  10. Select Add
  11. Give the repository a name like "Polarion subversion"
  12. Select both the Subversive SVN Connectors and Subversive SVN Connectors Sources checkboxes -> Next -> install anyway
  13. Restart Eclipse
  14. Restart Eclipse, and follow the rest of the instructions listed below to set up the SVN Repository.

    Note: For setting up the SVN Repository, please make sure the repository URL link provided matches the semester you are enrolled in. Example: For Fall 2017, the URL should be If errors persist: inform your TA at your lab/discussion. Keep in mind that if you recently enrolled or changed course times, please give the system 24 hours to fully process the modifications to your courses.

Setting up the SVN Repository

Your SVN Repository is where your projects are installed, the URL is as below:

Important: "YourNetId" in the URL above should be your actual netid, i.e. the first part of your email address You MUST change this in order for it to work.

To continue setting up your SVN repository, you will need to add the above repositories to Eclipse. Follow are the directions:

  1. First, you'll need the SVN Repository Perspective. (Window >> Perspective >> Open Perspective >> Other..., Select SVN Repository Explorer)
  2. In the SVN Repository Perspective, right click and select "New->Repository Location".
  3. In the window that comes up, put in your repository URL from above and click "Finish".
  4. Eclipse will ask you for a login and password. These are the same login and password you use for the EWS workstations. Login is your NetID and your password is your Active Directory password. You should save your password so you don't need to type your password each time.
  5. If a window comes up asking if you want to accept the certificate, click "Accept and Save".
  6. You can now see your repository. To see what is in your repository, right click on the repository and click "Refresh".

Using the SVN plugin

In CS125, you will mainly be using the following three features of the SVN plugin:

These features are explained below.

Adding projects to your repository

For this you need to use the Java Perspective. (Window >> Perspective >> Open Perspective >> Java)

  1. In the Java Perspective, right click the project that you want to add and select "Team->Share Project..."
    (Click on image to enlarge.)
  2. Select SVN and click "next".
  3. Choose "Use existing repository location" is selected. It should list the repositories that you have added.
  4. You can use either option for the shared folder name, click "next".
  5. Enter any comments you wish and click "finish".
  6. To make sure your project was added, right click on the repository in the SVN Repository view and select "Refresh".

Getting projects from your repository

Getting a project from your repository is called checking out. You need to have the SVN Repository Perspective open.

  1. Find the project that you want in the SVN Repository Perspective, then right click on it and select "Checkout..."
  2. Select "Check out as a project in the workspace". The revision to check out should be HEAD unless you want an earlier version of the project.i
  3. Click "finish". Eclipse will now get the project from your repository. When it finishes you will see your project in the Java Perspective.

Updating/Adding file(s)/folder(s) to your repository

Updating/adding files to your remote project is called committing. You need to have the navigator view open.

  1. Select the file(s)/folder(s) that you want to commit to the repository, then right click and select "Team->Commit..."
  2. Put in a comment if you want.
  3. If you are adding files, click "Select All" and make sure that the files that you want to add have their check boxes checked.
  4. Click "OK".

Updating/getting file(s)/folder(s) from your repository

Updating means updating your local copy using a remote one. You can update any file(s), folder(s), or the entire project. You need to have the Java Perspective open for this.

  1. Select the item(s) that you want to update, then right click on them and select "Team->Update HEAD".
  2. If you have changed your local copy since the last update (there should be a black symbol with a white star in it over the file/folder), Eclipse will bring up a compare window. Updating this way is the same as replacing your local copy. See Advanced Features of SVN: Rolling back local changes->Using SVN - Last revision

At this point, you may want to go back to lab section 1 instructions and continue on with the Hello World Tutorial

Advanced Features of SVN

Please see Advanced Features of SVN.


Error code 13 when Eclipse starts

  1. If you have multiple JDKs installed on your computer, make sure Eclipse is configured to run with the right one.
    • Edit eclipse.ini in a text editor. It is in the same folder as eclipse.exe
    • Just above the line with --launcher.XXMaxPermSize add something like
      C:/Program Files/Java/jdk1.8.0_66/bin/javaw.exe
      depending on what JDK you want.
  2. Make sure your PATH variable contains a path to your JDK.
    • Use a search engine to find out how to edit your PATH variable.
    • Make sure it contains something like "C:\Program Files\Java\jdk1.6.0_38\bin"

Error code 2 when Eclipse starts (and sometimes 13)

  1. Use a search engine to find out how to edit your PATH variable.
  2. Remove anything that looks like "C:\ProgramData\Oracle\Java\javapath;"

Compilation problems with or

  1. While in the Java perspective, navigate to Project >> Properties
  2. Select Java Compiler (in the left pane)
  3. Click the link "Configure Workspace Settings"
  4. Under JDK Compliance, make sure the compliance level is set to at least 1.6
    • If you choose compliance level 1.x, make sure you've installed the same version x of the Java JDK.

Another problem

Ask one of the discussion leaders or go to office hours. And wish them luck.