This is the Ptolemy II README.md File
Ptolemy II consists of a group of Java packages that support heterogeneous concurrent modeling and design.
The Ptolemy II documentation can be found in $PTII/doc/index.htm or http://ptolemy.berkeley.edu/ptolemyII/ptIIlatest/doc/index.htm
-
To develop Ptolemy II code, we recommend that you follow the [Ptolemy II Eclipse Instructions located in $PTII/doc/eclipse/index.htm or https://ptolemy.berkeley.edu/ptolemyII/ptIIlatest/doc/eclipse/index.htm
-
To build from the command line, see Building on Linux below, $PTII/doc/install_index.htm or https://www.icyphy.org/ptII/
There are no prebuilt Linux packages, so Ptolemy II is built from the git sources. The build takes about a minute on a typical machine. A shallow clone is roughly 800 MB.
- A JDK, version 11 to 21 (tested with 11, 17 and 21). JDK 25 currently
fails to build, see Troubleshooting. A JRE alone is
not enough because
configureneedsjavac. git- A graphical session to run the GUI (
vergil).
Apache Ant is bundled in the repository, so you do not need to install it.
Debian / Ubuntu / Linux Mint
sudo apt update
sudo apt install openjdk-17-jdk gitFedora / RHEL / Rocky / AlmaLinux
sudo dnf install java-17-openjdk-devel gitArch / Manjaro
sudo pacman -S jdk17-openjdk gitopenSUSE
sudo zypper install java-17-openjdk-devel gitCheck that the compiler is available:
javac -version # should print 11 to 21If several Java versions are installed (for example a newer default JDK), select the one you want before building:
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 # adjust to your system
export PATH="$JAVA_HOME/bin:$PATH"You can also pass --with-java=DIR to ./configure.
git clone --depth=50 --branch=master --single-branch https://github.com/icyphy/ptII
cd ptII
export PTII=`pwd`export LC_ALL=C.UTF-8 # see "Troubleshooting" if your locale is not UTF-8
./configure
$PTII/bin/antconfigure prints many WARNING messages about optional packages that are
not installed. These are normal. The build succeeded if ant ends with
BUILD SUCCESSFUL.
$PTII/bin/vergilvergil -version prints the version without opening a window. Run
$PTII/bin/ant -p to list the other build targets.
To avoid retyping, add these to your ~/.bashrc (or your shell's profile):
export PTII=/path/to/ptII
export PATH="$PTII/bin:$PATH"If you install or switch to a different JDK, install an optional package, or move the tree, reconfigure:
cd $PTII
rm -f config.*
./configure
$PTII/bin/antconfigure: Failed to find javac(followed by a message about/usr/java): only a JRE is installed. Install a JDK as shown above.unmappable character ... for encoding US-ASCIIduring the build: your locale is not UTF-8, which is common in minimal containers, CI and some SSH sessions, and JDKs before 18 then default to ASCII. Runexport LC_ALL=C.UTF-8and build again.Invalid CEN header (invalid zip64 extra data field size)while readinglib/jna-4.0.0-variadic.jar: this happens with JDK 25. Build with JDK 21 or 17 instead (setJAVA_HOME, put$JAVA_HOME/binfirst inPATH, then runrm -f config.*; ./configure).- Many
configure: WARNINGmessages about optional packages (OpenCV, JavaFX, JAI, CUnit, JavaCC, Matlab, ...), andUnrecognized option: -d32: harmless. Only an error at the end of theantoutput means the build failed. - Messages about macOS
.appbundles orMacJVM.tar.gz: harmless on Linux; the build still succeeds. - Warning that
/usr/bin/javais not the same as the JDK'sjava: yourPATHfinds a different JDK first. SetJAVA_HOMEand put$JAVA_HOME/binfirst inPATH, as shown above. vergilseems to hang at start-up: the first run updates the accessors repository withgit pull. SetPT_NO_NET=1to skip this when offline.- No window appears over SSH:
vergilis a GUI program and needs a display, for examplessh -X, or run it in a local desktop session.
Most dependencies (Colt, Diva, Jython, Ptjacl) ship inside the tree. Others are only needed for specific features, for example JavaCC if you modify the expression parser. See $PTII/doc/install.htm for the full list.