12.07.2015 Views

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix B: Installing PtPlot& Java Developer’s Kit PackagesThe first step in setting up PtPlot is to download the latest version and then uncompressit. 1 The plotting package we call PtPlot is part of a larger Java project calledPtolemy [PtPlot], all free for downloading. After you have properly unzipped oruntarred the PtPlot package, a directory such as ptplot5.6 should be created. Thenumber 5.6 here is the version number of the PtPlot package that we are nowusing; there may be a newer version when you do your download. For our exampleswe have renamed the directory in which PtPlot resides as simply ptplot, withno version number attached. On Unix, we assume that your ptplot directory will be˜/java_packages/ptplot, where the ˜ indicates your home directory. On Windows,we assume that your ptplot directory will be C:\ptplot. 2 Advanced users may preferto keep the version number in the directory name or use a different organizationalsystem. However, if this is the first time that you have installed a Java package, werecommend that you use the same directory names that we have.Now that we have placed the PtPlot package in its own directory, we need to tellJava where to find it. As a matter of convention, the Java compiler javac and the Javainterpreter java assume that the value of a variable named CLASSPATH contains theinformation on where packages such as PtPlot are stored. This type of variable thatcontrols the environment in which programs run is called an environment variable.Because the programs in the packages having already been compiled into classfiles, the variable that directs Java to the classes is called CLASSPATH. To get PtPlotto work under Java, you need to modify the CLASSPATH variable to include thelocation where PtPlot is stored.Windows 95: Open the autoexec.bat file (usually C:\autoexec.bat) in a texteditor such as Notepad. At the end of the file, add the lineSET CLASSPATH=%CLASSPATH%;C:\ptplotSave the autoexec.bat file and restart your computer.Windows 98/ME: Click Start and then Run under that. Key in the command namemsconfig and press Enter. The System Configuration Utility should appear. Selectthe tab Autoexec.bat and look for a line that says SET CLASSPATH. Ifyoucannot find that line, click New and enter SET CLASSPATH = C:\ptplot. If the1 If you have never done this before, you may want to do it with a friend who has. InWindows, you use WinZip to unzip files. In Unix, try double-clicking on an icon of thefile, or decompress it from within a shell with gunzip and tar -xvf.2 If you use the Windows automatic installer and you want to follow our examples verbatim,you should install to C:\ptplot rather than C:\ptolemy\ptplot5.6.−101<strong>COPYRIGHT</strong> <strong>2008</strong>, PRINCET O N UNIVE R S I T Y P R E S SEVALUATION COPY ONLY. NOT FOR USE IN COURSES.ALLpup_06.04 — <strong>2008</strong>/2/15 — Page 562

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!