javaare available, and have the
setenv PTII /users/yourname/ptII
cd "$PTII" rm -f config.* ./configure
make fast installOR: Install Apache Ant from https://ant.apache.org/ and run
ant cd bin; makeApache ant is much faster than make.
PTIIis covered in the Unix and Windows sections below.
http://www.oracle.com/technetwork/java/javase/downloads/index.html. Locally, we use Java 1.7.0_51.
The Java download is available in several formats.
bindirectory is in your path so that the
javacommands are available.
Currently, the Java Plug-in 1.6 is included in the JRE and JDK downloads for Windows.
If your platform is not supported by the plug-in, you can run
the applets with the JDK
See the Plug-in section of the Ptolemy II Troubleshooting guide for details.
We include a subset of Colt, based on Colt 1.0.3, in
Colt is covered by a Colt specific copyright.
The Ptolemy II distribution includes
As of Ptolemy II 4.0, the Diva sources and documentation are included in the source release.
More information about Diva can be found at
Usually, one not need install Jython as
all Ptolemy II distributions that include the PythonScript actor
also include Jython as
The Ptolemy II source distribution also includes
Jython is covered by a
Jython specific copyright
If, for some reason you want to install Jython by hand:
java -jar jython_installer-2.2.1.jarand then select the Standalone Jython installation, which will create
jython.jarand then install Jython in
Note that if you don't select the Standalone Jython install, then a set of Jython directories will be created. You should add the directory where Jython was installed to your path.
configurescript will look for
jython.jarin your path and then look for
testsubdirectory that contains Tcl files that use Jacl to test the Ptolemy II Java code.
Jacl is only necessary if you are planning on running the Ptolemy II test suite.
We ship a customized version of Jacl called Ptjacl. The primary difference between Ptjacl and Jacl1.1 is that Ptjacl is shipped as one jar file.
The Ptjacl jar file at
is shipped with Ptolemy II.
For more information about Jacl and Tcl Blend, see:
Soot is used by the Copernicus code generator.
Soot, is a Java optimization framework from
If the code generator is present, then we include
Soot and Jasmin are both covered by the Soot and Jasmin specific copyright
You need not install JAI if you are not planning on using the JAI Actors.
Note that you probably want to install the JAI "JDK Install".
We verified that
works with these actors.
Note that under Windows, only a x86 JAI installer is available, so you will may need to copy jar files to the 64-bit jre directory:
cp c:/Program\ Files\ \(x86\)/Java/jdk1.7.0_51/jre/lib/ext/jai* c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext cp c:/Program\ Files\ \(x86\)/Java/jdk1.7.0_51/jre/lib/ext/jai* c:/Program\ Files/Java/jre7/lib/ext/ cp c:/Program\ Files\ \(x86\)/Java/jdk1.7.0_51/jre/bin/mlib* c:/Program\ Files/Java/jdk1.7.0_51/jre/bin cp c:/Program\ Files\ \(x86\)/Java/jdk1.7.0_51/jre/bin/mlib* c:/Program\ Files/Java/jre7/bin
Note that under Web Start, we had to install the JAI jar files
by hand in
mlibwrapper_jai.jar from the
Web Start users might want to try the
"Windows Auto-installation for Java Plug-in"
http://www.oracle.com/technetwork/java/javase/tech/index-jsp-138252.html. You need not install Java3d if you are not planning on using GR domain.
If you plan on recompiling the GR domain, then install the Java 3D SDK and runtime. If you plan on only running the GR domain demos, then installing only the Java 3D runtime should be sufficient.
You may need to update the jre by hand:
cp c:/Program\ Files/Java/jdk1.7.0_51/jre/bin/j3dcore-ogl.dll c:/Program\ Files/Java/jre7/bin/ cp c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext/j3* c:/Program\ Files/Java/jre7/lib/ext/ cp c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext/vecmath.jar c:/Program\ Files/Java/jre7/lib/ext/
We have verified the demos with the
http://sourceforge.net/projects/javajoystick/. The Joystick interface works under Windows and Linux. Joystick is covered by a Joystick specific copyright
You must download and install the Joystick interface to use the Joystick actor.
Configure looks for the joystick interface in
$PTII/vendors/misc/joystick. In that directory,
it looks for
cp $PTII/vendors/misc/joystick/lib/jjstick.dll $PTII/bin
You need not install JMF if you are not planning on using the JMF Actors.
The installer also looks for the USB camera, so you may find
it helpful if you connect a USB camera before running the installer.
To configure a USB camera after installation, run
Under 64-bit Windows, we copied the jar files and other files into the JRE.
cp c:/Program\ Files\ \(x86\)/JMF2.1.1e/lib/* c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext cp c:/Program\ Files\ \(x86\)/JMF2.1.1e/lib/* c:/Program\ Files/Java/jre7/lib/ext/
We verified that
jmf-2_1_1e-windows-i586.exe works with these actors.
The Matlab interface works only under Windows and it requires that Matlab be installed on the local machine. The Matlab interface has been tested with Matlab 6.1, which corresponds with R12.1.
The Matlab Expression actor can access Matlab methods to process matrices and plot data using the Matlab plotter.
A demo can be found at
The Matlab interface works under Windows and Linux. In theory, the Matlab interface might work under Solaris, but we have not tested it.
Under Windows, we compile the Matlab interface with Microsoft
Visual C if it is available. Matlab interface has problems work with gcc-3.3
Under Windows, the Matlab interface has problems at runtime with gcc-3.3.
Under Windows, we recommend using gcc-3.2 or Microsoft Visual C. If you do not have Microsoft Visual C, you can try installing
cygwinDevel with gcc-3.2 from
Note that you should uninstall the previous version of cygwin
and then install the new version.
Below are the instructions for compiling under gcc.
If you do not have
installed, you can install them as part of the
The Matlab interface is implemented using the Java Native Interface
$PTII/configure is run, it look in the user
path for a binary called
matlab, determines the location
of the Matlab
extern/include/libeng.dif file and then checks
If these components were not found at when configure was run, then you can rerun configure, remake and run the demo with:
cd $PTII rm config.*; ./configure cd $PTII/ptolemy/matlab make $PTII/bin/vergil ./demo/MatlabExpression/MatlabExpression
GCC doesn't have a __int64 built-in, and this patch basically uses "long long" instead.
- Edit the file
jdk_rootis the installation root (eg.,
- Replace the segment:typedef long jint; typedef __int64 jlong;with:typedef long jint; #ifdef __GNUC__ typedef long long jlong; #else typedef __int64 jlong; #endif typedef signed char jbyte;
To use these actors, go to
(Note that the QuickTime SDK does not include QuickTime For Jav)
We chose the "Quicktime Standalone Installer", which does not contain iTunes.
During installation, choose "custom" and then "select all". This drops
QTJava.zip into the lib/ext of all your installed JREs.
Then you have to copy this zip file to the jre/lib/ext directory
of your SDK, for example:
cp c:/Program\ Files\ \(x86\)/Java/jre7/lib/ext/QTJava.zip c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext/ cp c:/Program\ Files\ \(x86\)/Java/jre7/lib/ext/QTJava.zip c:/Program\ Files/Java/jre7/lib/ext/
RXTX binary builds provided as a courtesy of Mfizz Inc. (http://mfizz.com/). Please see http://mfizz.com/oss/rxtx-for-java for more information.
Under Windows, download the zip file, then do something like:
cp ~/src/rxtx/mfz-rxtx-2.2-20081207-win-x64/RXTXcomm.jar c:/Program\ Files/Java/jdk1.7.0_51/jre/lib/ext/ cp ~/src/rxtx/mfz-rxtx-2.2-20081207-win-x64/RXTXcomm.jar c:/Program\ Files/Java/jre7/lib/ext/ cp ~/src/rxtx/mfz-rxtx-2.2-20081207-win-x64/*.dll c:/Program\ Files/Java/jdk1.7.0_51/jre/bin cp ~/src/rxtx/mfz-rxtx-2.2-20081207-win-x64/*.dll c:/Program\ Files/Java/jre7/bin
Under Mac OS X, see http://jlog.org/rxtx-mac.html. These files should be copied as follows:
sudo -i cp ~yourlogin/Downloads/librxtxSerial.jnilib /Library/Java/Extensions/ cp ~yourlogincxh/Downloads/RXTXcomm.jar /Library/Java/Extensions/
cd $PTII; rm config.*; ./configureand then make
Ptolemy II has been built with GNU make 3.77, but does not use GNU make extensions, so GNU make is not requires. Ptolemy II has also been built
with Solaris 8
It seems that the make that is included with SGI Irix 6.5 may have problems, the workaround is to installed GNU make.
JavaCC is only necessary if you modify the expression parser in
mkdir -p $PTII/vendors/sun
cd $PTII; rm config.*; ./configure
Note that JavaCC-4.2 will not work, there are problems with ReInit() in the data.expr tests.
PTIIenvironment variable in your environment. Under C Shell:
setenv PTII /users/ptIIYou may want to add that line to your
To configure the makefiles,
$PTII/configure, which is
a GNU autoconf script that looks for your Java compiler, reads in
$PTII/mk/ptII.mk.in and generates
cd "$PTII" rm -f config.* ./configure
$PTII/config.cache. If you would like to reconfigure Ptolemy II to use a different Java compiler, set your path so that the appropriate compiler is first in your path, then remove
config.statusand rerun configure. You may also use the
--with-java=configure command line argument. For more information, run
make fast all
To build Ptolemy II under Windows XP:
Be sure to add the
to your path so that
See the Ptolemy II 6.0 Website for Cygwin downloads that include the tools necessary to build Ptolemy II.
An alternative to using the Cygwin downloads we provide is to download directly from the Cygwin website.
Complete installation instructions can be found at
The Cygwin installer tends to change over time, but below is a summary of the steps necessary:
http://cygwin.com/install.htmland download and install either the 32-bit or 64-bit version of
Install from Internet, then click on
Downloadsdirectory in your home directory.
Base, which is roughly a 6Mb download that expands into about 26Mb of files.
If you are serious about development you may also want
to install the packages below. To install an individual package,
click on the
+ to the left of the group name, then
click on the arrows to the right of the group name
Default changes to
Next, which should compute the dependencies, download the packages and install them.
Add icon to Start Menu, and then
Cygwin Bash Shell
PTIIenvironment variable to the name of the directory where Ptolemy II is installed.
Executive Summary: Under Windows, it is safest if you use forward slashes
in both the
Environment Variables panel and when running
Cygwin bash. In Cygwin bash, don't use
to set your PTII variable.
Under Windows 8, you set the environment variable via
the Control Panel, then search for
and click on
Edit environment variables for your account.
Under older versions of Windows, you set the environment variable via
the Environment tab of the System control panel
Start Menu ->
Control Panels ->
The PTII value in the Environment tab should be set using forward slashes.
If Cygwin is installed in a location other than
C:\ such as
C:\Cygwin, then try
using backslashes, though installing Cygwin in such a manner
is not recommended.
Windows 8 users should set PTII in the Environment Tab using forward slashes.
Note that when setting PTII from Cygwin bash, you should use forward slashes.
If you have installed Cygwin in c:/cygwin, and your Ptolemy II installation is in a directory outside of the c:/cygwin tree, then Cygwin may change your PTII variable to include "/cygdrive/c". This will cause problems with non-Cygwin tools like javac that do not understand /cygdrive/c.
The best fix for this is to move your home directory outside of c:/cygwin. An alternative is to place your Ptolemy II tree outside of c:/cygwin.
How to tell Cygwin where your home directory is
- Cygwin gets the location of your home directory from a line that contains your login in
c:/cygwin/etc/passwd. If your login is not listed, then runmkpasswd -lTo list all the local accounts and add the line for your account to
workdpad. To start
wordpad, do Start -> Run and type in
Note: you can use
mkpasswd -helpto get help. If you are logged in to the domain and not the local machine, trymkpasswd -d | grep yourloginto get just your login
c:/cygwin/etc/passwdwith wordpad and change the home directory from
/cygdrive/c/users/yourlogin, which will set your home directory as
- Start up a new bash shell and see where your home directory is by typing
An example PTII value in the Environment Tab would be:
An example PTII value inside Cygwin bash would be:
Cygwin directory mapping
Note that Cygwin remaps directories, so
d:\tmpmay appear as
javacommand does not understand the Cygwin
javamay not find the files it needs.
/cygdrive/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 d:\tmp\ptII cxh@MOWAT-171 /cygdrive/d/tmp/ptII $ cd $PTII cxh@MOWAT-171 /cygdrive/d/tmp/ptII $ pwd /cygdrive/d/tmp/ptIISo, under Cygwin, it is best to avoid using pwd when setting variables. Avoid:PTII=`pwd`/ptIIand usePTII=d:\\tmp\\ptIIinstead. Note that the configure script checks for this sort of thing.
When you run cygwin.bat, your path
should be set to include the Cygwin tools. You can test this
type make, which should return
make is /usr/bin/makeIf
makecannot be found, then you may also need to add the Cygwin bin directory
c:\cygwin\usr\binto your path.
bash, and cd to the Ptolemy II directory.
rm -f config.*
make fast all
$PTII/bin/vergilif you did not set your path) in the C shell or cygwin Bash window and the Ptolemy II GUI should start up
Currently, Ptolemy II does not support building via Microsoft
nmake under Windows. Also, we have not
tried building Ptolemy II under Windows '95 or Windows '98.
The instructions for setting up a parallel tree using CVS can be found in
Last Updated: $Date: 2014-12-16 13:52:11 -0800 (Tue, 16 Dec 2014) $