Nightly Build (Installers)
Nightly Build (Logs)

Ptolemy II External Access

The ptexternal workgroup is how the Ptolemy Project collaborates with researchers and developers outside Berkeley. Below are instructions for accessing the current development version of Ptolemy II, which is stored on Github. Other key resources:

How to get Ptolemy II source code

For the impatient

Install Java 1.8, install git and then run:
      git clone --depth=50 --branch=master --single-branch https://github.com/icyphy/ptII
      cd ptII
      export PTII=`pwd`
To develop Ptolemy II code, we recommend that you follow the Ptolemy II Eclipse Instructions

Or, see the Ant instructions.

Windows users, Eclipse is the preferred installation method. If you want to build with Cygwin, see

Summary of ways to get ptII

How Advantages Disadvantages
Use the most recent stable release Stable configuration that has been tested on multiple platforms
Includes a Windows installer
Last updated in December, 2014.
Use the most recent snapshot release Stable configuration that has been lightly tested on multiple platforms.
Includes a Windows installer.
As of November, 2015, the most recent snapshot is available on the Nightly Build page.
Github: Just the master branch and the last 50 commits To download just the master branch and the last 50 commits, use:
      git clone --depth=50 --branch=master --single-branch https://github.com/icyphy/ptII
Takes about 2 minutes via Wi-Fi.
Github Full Download To download the entire Git repository of 75,000 commits and 40-50 branches, use:
        git clone https://github.com/icyphy/ptII
Takes 5 minutes to download on a fast machine, 20 minutes via Wi-Fi.
Nightly Build source tar files Easy to get
Optionally includes a Windows installer (that has not been tested)
The nightly build does not always work, so you might download a broken build, which would require downloading a new version.
Getting updates requires downloading an entire new distribution.

Install Java

Ptolemy II requires JDK 1.8. or later. For details, see $PTII/doc/install.htm.
ptII/doc/install.java in the source tree you have just downloaded more fully describes what packages to install.

The quick Java installation instructions:

  1. Install the latest JDK from http://java.sun.com/javase/downloads/index.jsp
    Oracle calls the JDK various names: JDK 8 or Java SE 8 or JDK1.8.
    The installation should end up in a directory like c:/Program Files/Java/jdk1.8.0

Build instructions

You have now checked out the source code! But it still needs to be compiled. First you will need to set some environment variables. These may be set locally in the shell, or globally via a Windows dialog box.

To set the environment variables in a C shell, first cd to the directory (such as your home directory) where your ptII directory lives. Then use the following commands:

    setenv HOME `pwd`
    setenv PTII `pwd`/ptII
To set them in a Bash shell:
    export HOME=c:/directoryOfYourChoice
    export PTII=c:/directoryOfYourChoice/ptII
The export commands above are useful if you will be creating subprocesses of your Bash shell. Anyway, they don't hurt.

Cygwin directory mapping

Note that Cygwin remaps directories, so d:\tmp may appear as /cygdrive/d/tmp.

Unfortunately, the java command does not understand the Cygwin /cygdrive notation, so java may not find the files it needs.

For example, pwd returns /cygrive/d/tmp/ptII, which will not work with java:

	      cxh@MOWAT-171 /cygdrive/d/tmp/ptII
	      $ PTII=d:\\tmp\\ptII

	      cxh@MOWAT-171 /cygdrive/d/tmp/ptII
	      $ echo $PTII

	      cxh@MOWAT-171 /cygdrive/d/tmp/ptII
	      $ cd $PTII

	      cxh@MOWAT-171 /cygdrive/d/tmp/ptII
	      $ pwd
So, under Cygwin, it is best to avoid using pwd when setting variables. Avoid:
and use

An alternative is to use the cygpath command.

	      export PTII=`cygpath -m ${PWD}`
This results in a path that has forward slashes. Formerly, under Windows, Java would not work well with forward slashes, but that problem seems to be fixed in Java 1.7.
In either shell, you may also wish to set your path to include c:\directoryofyourchoice\ptII\bin (where vergil lives) and c:\Program Files\Java\jdk1.8.0\bin or wherever your java installation is located.

To set environment variables in Windows, do Start -> Settings -> Control Panel -> System. Click the Advanced tab and then the Environment Variables button. Set up the following under the heading User variables for yourlogin

    Variable    Value
    HOME        c:\directoryofyourchoice
    PTII        c:\directoryofyourchoice\ptII

Under System Variables, augment your Path variable. Edit it, and add c:\directoryofyourchoice\ptII\bin; in front of the existing text in the Variable Value window. You may also wish to add something like c:\Program Files\Java\jdk1.8.0\bin; to point to the java installation you want Ptolemy II to use. Otherwise, the one in your WINNT/System32 directory may be used.

If you have used the Windows dialog to set the environment variables, you will need to open a new shell in order to have them take effect. On the other hand, if you have set them from within the shell, do not open a new one. New shells will not have the variables set.

You are now ready to compile Ptolemy II! First you configure. To use the default java instalation on your system, simply type the following command:

The ./ in the above command is needed to convince the shell that you really do want to execute configure as a command, even though your current working directory may not be on your path. If you wish to control the exact java used, you may specify it with a command like the following instead:
    ./configure --with-java=c:/Program\ Files/Java/jdk1..0
Note that --with-java is not well supported, and you are better off having your path properly set up so that the version of java you would like Ptolemy II to use is first in your path.

Which ever form you use, it grinds briefly. Some warnings or errors are normal. Mostly they indicate optional adjuncts to Ptolemy II which were not installed.

The next step is to run make:

    make fast all
The all directive isn't strictly necessary, since all is the default. The fast directive speeds compilation of multiple java files. It causes many java files to be loaded into the compiler at once, instead of re-invoking the compiler for each java file.

You're done!! You can type now vergil (or $PTII/bin/vergil if you did not set your path) in the C shell or cygwin Bash window and it should start up!

Note that if your $PTII path includes spaces, then try


To update your tree and get any updates, do:

    cd $PTII
    git pull

Updating This Page

See Editing ptexternal workgroup content.

Version: $Id: index.html 224 2018-03-08 01:17:46Z cxh $

You are not logged in 
©2002-2018 Chess