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.
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.
- Go to Oracle's Java download page and click the button to download the JDK.
- Find the latest version of the Java SE Development Kit (probably Java SE 8u144 ... no need to download the demos and samples)
- Choose the JDK for your operating system: Windows, Mac, or Linux
- Modern 64 bit CPU: always choose 64 bit versions—they will be labeled with "64" as part of their name.
- Note if you see *x86 without "64" attached, it means Intel 32 bit.
- Install the JDK, and the included JRE, but due to security issues we recommend you disable the applet web browser plugin.
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.
- Windows: unzip the file to any desired location and run eclipse.exe from that location.
- Mac OSX: unzip the file and drag the folder somewhere
useful (eg your Applications folder). Then click on the Eclipse icon
inside the sub-folder to start 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.
- Run Eclipse
- Go to Help >> Eclipse Marketplace...
- Type "subversive" into the Find field
- Click <Install> under "Subversive - SVN Team Provider 4.0.5"
- Tick only the checkbox for "Subversive SVN Team Provider (required)"
- After installing, you must restart Eclipse
- Close the Welcome window
- After restart, in Eclipse, go to Eclipse -> Help -> Install new software
- Work with: "http://community.polarion.com/projects/subversive/download/eclipse/6.0/update-site/"
- Select Add
- Give the repository a name like "Polarion subversion"
- Select both the Subversive SVN Connectors and Subversive SVN Connectors Sources checkboxes -> Next -> install anyway
- Restart Eclipse
- Restart Eclipse, and follow the rest of the instructions listed below to set up the SVN Repository.
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 https://subversion.ews.illinois.edu/svn/fa17-cs125/YourNetId
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
firstname.lastname@example.org. 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:
- First, you'll need the SVN Repository Perspective. (Window >> Perspective >>
Open Perspective >> Other..., Select SVN Repository Explorer)
- In the SVN Repository Perspective, right click and select "New->Repository Location".
- In the window that comes up, put in your repository URL from above and click "Finish".
- 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.
- If a window comes up asking if you want to accept the certificate, click "Accept and Save".
- 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:
- Adding projects to your repository
- Getting projects from your repository
- Updating and Adding file(s)/folder(s) to your repository
These features are explained below.
Adding projects to your repository
For this you need to use the Java Perspective. (Window >> Perspective >> Open Perspective >> Java)
- In the Java Perspective, right click the project that you want to add and select "Team->Share Project..."
(Click on image to enlarge.)
- Select SVN and click "next".
- Choose "Use existing repository location" is selected. It should list the repositories that you have added.
- You can use either option for the shared folder name, click "next".
- Enter any comments you wish and click "finish".
- 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.
- Find the project that you want in the SVN Repository Perspective, then right click on it and select "Checkout..."
- 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
- Click "finish". Eclipse will now get the project from your
repository. When it finishes you will see your project in the Java
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.
- Select the file(s)/folder(s) that you want to commit to the repository, then right click and select "Team->Commit..."
- Put in a comment if you want.
- If you are adding files, click "Select All" and make sure that the files that you want to add have their check boxes checked.
- 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.
- Select the item(s) that you want to update, then right click on them and select "Team->Update HEAD".
- 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
- If you have multiple JDKs installed on your computer, make sure Eclipse is configured to run with the right one.
- 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)
- Use a search engine to find out how to edit your PATH variable.
- Remove anything that looks like "C:\ProgramData\Oracle\Java\javapath;"
Compilation problems with Zen.java or TextIO.java
- While in the Java perspective, navigate to Project >> Properties
- Select Java Compiler (in the left pane)
- Click the link "Configure Workspace Settings"
- 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.
Ask one of the discussion leaders or go to office hours. And wish them luck.