Other sources of information:
Below is a list of common Ptplot problems.One known problem is that if you have a CLASSPATH environment set when you started your browser, you may get an error message when accessing some of the demos. We suggest unsetting this environment variable, restarting your browser (and sending email to Sun's Java team to complain about the way the CLASSPATH environment variable works). You may also want to check the Java FAQ.
If you have CLASSPATH set, and you run Netscape, then you might see messages like:
Applet Marks can't start: security violation: security.class from local disk trying to access url: http://ptolemy.eecs.berkeley.edu/java/ptolemy/plot/demo/data.pltThe CLASSPATH variable is by far and above the trickiest thing to get right.
bash-2.02$ ./ptplot ./ptplot: Could not find '/tmp/ptolemy/plot'. Perhaps your PTII variable is not set properly? Exception in thread "main" java.lang.NoClassDefFoundError: ptolemy/plot/plotml/EditablePlotMLApplicationThe problem here is that the pxgraph script cannot find the ptplot installation. This probably means that your PTII environment variable is not set correctly. Set it to point to the home directory of the plot or Ptolemy II distribution.
To debug such a situation completely,
use which
(on Unix) or type
(on Windows with Cygwin)
to find out which ptplot
script is running, and the run it with the sh -x
flag:
First we run which
:
bash-2.02$ type ptplot ptplot is /users/cxh/ptII/bin/ptplotThe we use
sh -x
. Note that the output you see might be
different, depending on what version of the pxgraph
script
you are running.
bash-2.02$ sh -x /users/cxh/ptII/bin/ptplot + PTII_DEFAULT=/users/cxh/ptII_old + PTJAVA_DIR=/jdk1.2.2 + '[' -z '' ']' + '[' -d /users/cxh/ptII_old ']' + PTII=/users/cxh/ptII_old + export PTII + '[' '!' -d /users/cxh/ptII_old/ptolemy/plot ']' + echo '/users/cxh/ptII/bin/ptplot: Could not find '\''/users/cxh/ptII_old/ptole my/plot'\''. Perhaps your PTII' /users/cxh/ptII/bin/ptplot: Could not find '/users/cxh/ptII_old/ptolemy/plot'. Perhaps your PTII + echo ' variable is not set properly?' variable is not set properly? ++ basename /users/cxh/ptII/bin/ptplot + '[' ptplot = pxgraph ']' ++ basename /users/cxh/ptII/bin/ptplot + '[' ptplot = histogram ']' + javastartupclass=ptolemy.plot.plotml.EditablePlotMLApplication + windows=no + windows=yes + '[' -z '' ']' + '[' -d /jdk1.2.2 ']' + JAVAHOME=/jdk1.2.2 + export JAVAHOME + '[' -z /jdk1.2.2 ']' + '[' -z /jdk1.2.2 ']' + '[' yes = yes ']' ++ cd /users/cxh/ptII_old ++ cmd /c chdir ++ tr -d '\r' + WINPTII=D:\users\cxh\ptII_old + /jdk1.2.2/bin/java -classpath 'D:\users\cxh\ptII_old;/jdk1.2.2\lib\classes.zip' ptolemy.plot.plotml.EditablePlotMLApplication Exception in thread "main" java.lang.NoClassDefFoundError: ptolemy/plot/plotml/E ditablePlotMLApplication bash-2.02$In the output below, the key line is the line towards that bottom that runs the
java
interpreter:
+ /jdk1.2.2/bin/java -classpath 'D:\users\cxh\ptII_old;/jdk1.2.2\lib\classes.zip' ptolemy.plot.plotml.EditablePlotMLApplicationIn the ptplot script, the first element in the
-classpath
argument should be a pathname that leads to the top of the Ptolemy II
or Ptplot directory tree.
In this case, there are two problems, one is that $PTII
is not set, so the script is using the value of PTII_DEFAULT
which was hardwired into the script when configure
was run.
Unfortunately, the ptplot
script
was left over from an old installation, and at the top
of the script PTII_DEFAULT was set to /users/cxh/ptII_old
is an empty directory that does not contain a Ptolemy II tree.
The fix is to rerun configure
and
make install
so that the ptplot
script
is properly set up.
Another common fix is to edit the pxgraph
script
and change the variables at the top to point to the proper location.
Last Updated: $Date: 1999/08/20 01:22:43 $