Ptplot on the Zaurus

Ptplot 1.0 and Ptplot 2.0 can run on the Sharp Zaurus!

Set up

  1. Download http://ptolemy.eecs.berkeley.edu/java/ptolemy.plot2.0/ptolemy/plot/ptolemy.plot.jar (tar file version: http://ptolemy.eecs.berkeley.edu/java/ptolemy.plot2.0/ptolemy/plot/ptolemy_plot_jar.tar) On the Zaurus put ptolemy.plot.jar into a directory. I put it in /home/root/lib
  2. Create a shell script on the Zaurus at /home/root/bin/ptplot. The script should look like:
    #!/bin/sh
    # Ptplot
    evm -classpath /home/root/lib/ptolemy.plot.jar ptolemy.plot.PlotApplication $@
    
  3. Make the shell script executable
    chmod a+x /home/root/bin/ptplot
    
  4. On the Zaurus, add /home/root/bin to your path:
    export PATH=/home/root/bin:${PATH}
    
  5. Run the script
    ptplot
    
    The default image should come up
  6. Create a simple data file
    cat > plot.plt << EoF
    1 1
    2 3
    4 5
    EoF
    
  7. Run ptplot:
    ptplot plot.plt
    
For more information, see the Ptplot 2.0 web page at http://ptolemy.eecs.berkeley.edu/java/ptolemy.plot2.0/ptolemy/plot/index.html

Recompiling

The basic idea is to recompile Ptplot using javac -target 1.1 and then run using gevmg

Versions of PtPlot after PtPlot 2.0 use Java 1.2 features or use Swing. I don't think the JVM on the Zaurus can handle 1.2 or Swing.

  1. Download http://ptolemy.eecs.berkeley.edu/java/ptolemy.plot2.0/ptolemy/plot/ptolemy.plot2.0.tar.gz to a Windows or Unix box
  2. Untar, set $PTII and configure:
    cd ~/src
    gtar -zxf /tmp/ptolemy.plot2.0.tar.gz
    cd ptolemy.plot2.0
    setenv PTII `pwd`
    ./configure
    
  3. Edit $PTII/mk/ptII.mk and add -target 1.1 to gJFLAGSg
    JFLAGS = 	-g  -target 1.1
    
    Note that I had to remove -depend from the above line
  4. Run
    make clean
    make
    make install
    
  5. This will produce ptolemy.plot2.0/ptolemy/plot/ptolemy.plot.jar. Copy ptolemy.plot2.0/ptolemy/plot/ptolemy.plot.jar to the Zaurus. I put it in /home/root/lib
  6. Create a small script called ptplot:
    #!/bin/sh
    # Ptplot
    evm -classpath /home/root/lib/ptolemy.plot.jar ptolemy.plot.PlotApplication $@
    
    I created this script on my host machine, did chmod a+x ptptot and then copied it to the zaurus to /home/root/lib/ptplot
  7. On the zaurus, run
    /home/root/lib/ptplot