The CPN Tools simulator is running in a separate environment (under Cygwin) which may have problems reading
.cpn model files stored in a “strange location”. Try saving your model in a directory/filename without special characters (no spaces, only basic ASCII characters, e.g.,
Stale preference files
 First, try deleting stale
preferences.xml files. It is located in the user settings directory, often
C:\Documents and Settings\USER\Application Data\CPN Tools or
C:\Users\USER\AppData\Roaming\CPN Tools, depending on the version of Windows.
 From CPN Tools 4.0 onwards, the simulator also makes use of Java (see “When Using CPN Tools 4” later on), which stores preferences in the Windows registry key
HKEY_CURRENT_USER\Software\JavaSoft\Prefs\org\cpntools. Try clearing stale preferences in the registry by deleting the entire key
...\cpntools. Caution: using the registry editor incorrectly can cause serious, system-wide problems that may require you to re-install Windows to correct them.
Correctly running simulator
Simulator Process, make sure
Remote is unchecked (or you know what you are doing)
 Make sure that the
cpnmld process is allowed to listen on port 2098 (make sure no firewall or anything else is blocking it)
 Try loading a model and check if you have these processes:
* indicated that the suffix may depend on which version of CPN Tools and operating system you are running. You should see (at least) two copies of
cpnmld and one of
 Try shutting down CPN Tools and killing any
run.x86* processes. Alternatively restart your computer. Then try again.
 Try logging in and running CPN Tools as an administrator.
More advanced steps.
 Try starting the simulator manually; go to the
cpnsim subdirectory of the CPN Tools installation directory (
C:\Program Files\CPN Tools\cpnsim is standard on 32 bit systems,
C:\Program Files (x86)\CPN Tools\cpnsim on 64 bit systems). In a terminal (cmd) run
C:\Program Files\CPN Tools>.\cpnmld.x86-cygwin -d 2098 .\run.x86-cygwin (don’t type anything before the
>); then load your net and see if that helps. If not, try entering absolute paths for both programs, i.e., the default on 32 bit systems would be
C:\Program Files\CPN Tools\cpnsim>"c:\Program Files\CPN Tools\cpnsim\cpn.ML.x86-cygwin" -d 2098 "c:\Program Files\CPN Tools\cpnsim\run.x86-cygwin.exe" and try again.
 If step 8 does not help, try executing steps 6 and 8 again.
 If step 8 complains about a DLL with
cygwin in its name, you may be running programs using a conflicting version of the Cygwin DLL (such as Cygwin or another Cygwin-compiled program like nx). The easiest is to restart your computer
 Try executing step 8 without debug info (remove the
-d flag). This means I cannot look into your problem, but may provide you with a means to run CPN Tools.
Make sure, the version of the simulator used is compatible with the version of the GUI used. CPN Tools always ships with appropriate and matching versions of the two, but if you have multiple versions of CPN Tools installed, they may get mixed up. This can also happen if you run using a remote simulator and forgot to update or is using Access/CPN. Access/CPN is always released along with CPN Tools to ensure compatibility. It is always a good idea to use the latest version of CPN Tools and the latest version of Access/CPN for production work.
When using CPN Tools 4
CPN Tools 4 requires a recent installation of Java. Sometimes the Java installation does not set up your computer correctly (or Java is installed by another user without administrative privileges). If you encounter problems creating a net (tool crashing/net cannot be created), try the following:
- Make sure to download and install a recent JRE/JDK from
http://www.oracle.com/technetwork/java/javase/downloads/index.html(anything from 7 and up should work).
- If you get an error after installing Java, make sure to set your environment variables (varies with the version of Windows, so look that up; on Windows, select advanced system settings in Control panel and then Environment variables) so that
JAVA_HOMEpoints to the installation location (e.g.,
c:\Program Files\Java\jre8) and your
JAVA_HOME(in the example, it would have to include
Sometimes the installer sets this up correctly, sometimes not. It seems to be a problem especially with the 64 bit installer, but everything works with all combinations of architectures as long as the variables are set correctly.
When using CPN Tools prior to 3.5.0
Make sure your model is actually valid. Places must have types, arcs must have inscriptions, and transitions must be connected to at least one place. Starting with 3.5.0 these requirements have been removed.
If you are positive, your model is valid (or have loaded one of the shipping samples), make sure your simulator is running correctly. Typically the Standard declarations should be checked if it is.
You may also want to check out the tips for CPN Tools crashing.