COMP 310
Spring 2018

HW06:  Setting Up Your Project

Home  Info  Canvas   Java Resources  Eclipse Resources  Piazza

For this assignment, we will be providing you with code to parse abc music files and to help play music after you have processed it.  In order to use our provided code, you will have to set up your Eclipse project to get it from the course subversion repository.  You will also need to set the default working directory in the run configuration for the project.

Link SVN to the Provided Code and Songs

Please follow these steps to set up your project:

  1. Create a new "HW06" project in your workspace.  As you follow the new Java project dialog boxes, remember to configure it to use separate source ("src") and class ("bin") directories.
  2. Add the project to your subversion repository using the standard SVN procedure for assignmentsDo this before you add anything else to your project.
  3. Commit the entire project. (If this does not work, you should try to just commit the "src" directory instead.)
  4. To obtain the provided code, you will need to set a "property" on the "src" directory.
    1. Right click the "src" directory and choose "Team/Set Property...".  It is critical you do this on the "src" directory and not some other directory.
    2. The property name should be "svn:externals".  You must use this property name exactly (without the quotes).   It is available on the drop list of properties.
    3. Keep "Enter a text property" selected and type "provided https://svn.rice.edu/r/comp310/course/HW06/provided" in the box (all on one line without the quotes).
    4. Do not select "Set property recursively".
    5. Click "OK".
  5. Commit the entire project again (this commits the change to the property).
  6. Update your project.  Right click the HW06 or src directory and choose "Team/Update to HEAD".  This will retrieve the provided code, which is all in the provided package (and subpackages).

Do not edit any of the code in the provided package or its subpackages.  You will not be able to commit any such changes to subversion.

Once you have completed the above steps, you can add your own packages into the src directory as you normally would.  Those packages will be added to your personal subversion repository, as normal.

If we update the provided code, either to give you new features or to fix bugs, all you will have to do is repeat step 6 above to update your project and you will have the new code.

You can retrieve the provided songs in the same way: just add a line with "songs https://svn.rice.edu/r/comp310/course/HW06/songs" to the svn:externals property:

Linux Users: If you have trouble playing sound, it may be an issue with the version of Java you are using.  On the machines we have tested, you can solve the problem by setting the project JRE to be the openjdk instead of the Sun JDK.  This should not affect Eclipse or any other project you have, as it only changes the JRE for that one project.

Set the Default Working Directory for the Run Configuration

By default, Eclipse will use the project root folder as the default working directory when running a project.   However, this is inconsistent with the Java standard, which uses the bin folder as the default working directory.    You must change the default working directory to be the bin folder or your project will not work for you, your partner and/or the graders.     An incorrect working directory shows up as errors when trying to load songs.

See the directions for Editing the Launch Configuration Parameters


© 2018 by Stephen Wong