Set up the Eclipse ptII project .classpath for Ptolemy II

Once you have downloaded the Ptolemy II source files, Eclipse uses the .classpath file to set paths and exclude files.
There are two choices:
  1. In the Ptolemy II source tree, copy .classpath.default to .classpath. This choice is the simpler choice, but might exclude optional third party packages.
  2. Run ./configure. This choice is more complex, but this choice will include optional third party software that is already installed on your machine.
  1. Choose one of the options below.

    If you intend to use CapeCode for work with accessors, then you must install Cygwin so that the git binary is present. Installing Cygwin is the second option.

    A. Copy .classpath to .classpath.default

    OR

    B. Run ./configure

    Ptolemy II includes a number of packages that rely on software that you may or may not have installed, such as MATLAB, the rxtx package (for serial port connections), Java Advanced Imaging (JAI), the Java Media Framework (JMF), and Java 3D. If you wish to use or extend these features, you will need to perform a few extra steps. These steps require execution of a script called configure in the Ptolemy II home directory.

    In addition if you intend to use CapeCode, the IoT framework, you will need Git installed, which is best done using Cygwin.

    The procedure below will modify the .classpath file that is provided in the version control repository to customize it for the software that you have installed.

    1. Unfortunately Windows does not ship with Unix shell commands like make. The workaround is to install Cygwin, see http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/cygwin.htm
    2. It is a good idea to be sure that c:\cygwin64\bin is in your Windows Path.
      1. Right click on My Computer, select Properties -> Advanced System Settings -> Environment Variables
      2. Under "System variables", scroll to the PATH line and click Edit ...
      3. Insert c:\Cygwin64\bin; at the start of the path
      4. If you have not yet done so, insert the path the the JVM as well: C:\Program Files\Java\jdk1.8.0_121\bin;
    3. Start up the Cygwin Bash shell: Start | Run | Cygwin
    4. Change to the directory where the Ptolemy II source code was installed. For example:
      	      cd c:/Ptolemy/ptII11.0.devel
                  
      Note that if there are spaces in the path name to the directory where your Ptolemy installation is located, then you should use double quotes around the path:
      	      cd "c:/Documents and Settings/yourLogin/workspace/ptII"
      	  
    5. Set $PTII to the location of the Ptolemy II source tree:
      	      export PTII=c:/Ptolemy/ptII11.0.devel
      	    
      Note that Ptolemy II does not work well if there are spaces in the path If you insist on using a directory that has spaces in the path, use double quotes: export PTII="c:/Documents and Settings/yourLogin/workspace/ptII"
    6. Run:
      	      ./configure
      	    
      This will create $PTII/.classpath
  2. Choose one of the choices above.
  3. Once you have configured .classpath, go back to Eclipse and do File | Refresh so that Eclipse gets the updated .classpath file.
  4. Build Ptolemy II by doing Project | Build All.
    Note that you may want to select Project | Build Automatically..
  5. Go on to Running Ptolemy II.