It works now, sort of. I tried your instructions and found that it works if I start vergil from cygwin. That solves my immediate problem--it now reads values from Excel files. However, eventually I need to distribute the class for others (non-programmer types) to use. Most of these won't have cygwin.
I checked as you suggested and the classpath is set in DOS and cygwin. I will take a closer look at your comments and try to see why it works in cygwin, but not from Windows. BTW, the project I am working on (ATLAS, Advanced Technology Life-Cycle Analysis System) is an architecture/mission simulator for NASA's Return to the Moon project. Others (non-programmers) have developed a lot of Excel models of launch vehicles, crew capsules, lunar rovers and habitats, etc. An analyst strings together a set of missions using combinations of the available models, selects the technologies (what type of batteries for the rover, for example) and runs an analysis to get results including a mass estimate and cost profile over time (including R&D, production, launch operations, mission operations, etc.). Right now it is done with Excel & VBA. We are looking at replacing this with Ptolemy as a DES with actors that call the spreadsheet models. Thanks for your help. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, July 08, 2005 5:15 PM To: Goode, Wayne Cc: ptolemy-hackers@messier.eecs.berkeley.edu Subject: Re: Probem writing a Ptolemy actor with POI/HSSF Hi Wayne, You will need to start a new Cygwin bash shell to see the new value of $CLASSPATH. To verify that CLASSPATH is set, start up Cygwin bash and run: echo $CLASSPATH $PTII/bin/vergil -v works fine for me, I suspect we are running different vergil scripts or binaries. Below, in a Cygwin bash shell, I set CLASSPATH, verify it, set PTII, verify it and run vergil -v [EMAIL PROTECTED] ~ $ export "CLASSPATH=c:/Ptolemy/ptII5.0-beta/poi/poi-2.5.1-final-20040804.jar;${CLASSP ATH}" [EMAIL PROTECTED] ~ $ echo $CLASSPATH c:/Ptolemy/ptII5.0-beta/poi/poi-2.5.1-final-20040804.jar;.;C:\PROGRA~1\JMF21 ~1.1E\lib\sound.jar;C:\PROGRA~1\JMF21~1.1E\lib\jmf.jar;C:\PROGRA~1\JMF21~1.1 E\lib;C:\WINDOWS\java\classes;.;"C:\Program Files\Java\j2re1.4.2_08\lib\ext\QTJava.zip" [EMAIL PROTECTED] ~ $ cd c:/Ptolemy/ptII5.0-beta [EMAIL PROTECTED] /cygdrive/c/Ptolemy/ptII5.0-beta $ export PTII=c:/Ptolemy/ptII5.0-beta [EMAIL PROTECTED] /cygdrive/c/Ptolemy/ptII5.0-beta $ echo $PTII c:/Ptolemy/ptII5.0-beta [EMAIL PROTECTED] /cygdrive/c/Ptolemy/ptII5.0-beta $ cd $PTII [EMAIL PROTECTED] /cygdrive/c/Ptolemy/ptII5.0-beta $ $PTII/bin/vergil -v "/cygdrive/c/j2sdk1.4.2_08/bin/java" -Xmx256M "-Dptolemy.ptII.dir=c:/Ptolemy/ptII5.0-beta" -Duser.language=en -Duser.region=US -classpath "c:\Ptolemy\ptII5.0-beta;c:/Ptolemy/ptII5.0-beta/lib/diva.jar;c:/Ptolemy/ptI I5.0-beta/lib/ptCal.jar;c:/Ptolemy/ptII5.0-beta/lib/java_cup.jar;c:/Ptolemy/ ptII5.0-beta/lib/ptcolt.jar;c:/Ptolemy/ptII5.0-beta/lib/sootclasses.jar;c:/P tolemy/ptII5.0-beta/lib/jasminclasses.jar;c:\j2sdk1.4.2_08\jre\lib\rt.jar;c: /Ptolemy/ptII5.0-beta/lib/ptjacl.jar;c:/Ptolemy/ptII5.0-beta/lib/jython.jar; ;C:/Program Files/java/j2re1.4.2_08/lib/ext/QTJava.zip;c:/Ptolemy/ptII5.0-beta/lib/mapss .jar;c:/Ptolemy/ptII5.0-beta/lib/saxon7.jar;c:/Ptolemy/ptII5.0-beta/vendors/ misc/x10/tjx10p-11/lib/x10.jar;c:/Ptolemy/ptII5.0-beta/poi/poi-2.5.1-final-2 0040804.jar;.;C:\PROGRA~1\JMF21~1.1E\lib\sound.jar;C:\PROGRA~1\JMF21~1.1E\li b\jmf.jar;C:\PROGRA~1\JMF21~1.1E\lib;C:\WINDOWS\java\classes;.;\"C:\Program Files\Java\j2re1.4.2_08\lib\ext\QTJava.zip\"" ptolemy.vergil.VergilApplication Opening user library C:\Documents and Settings\cxh\.ptolemyII\UserLibrary.xml... Done [EMAIL PROTECTED] /cygdrive/c/Ptolemy/ptII5.0-beta $ The message about "Cannot set parameter -v" indicates that there is something wrong with the command line argument parsing and that the -v is not getting getting handled. One problem could be that you are running the Windows Installer vergil binary instead of $PTII/bin/vergil. For example, if I run the Windows Installer vergil-full.exe binary with ./vergil-full.exe -v Then I see such a message. Also, it looks like the DOS batch file $PTII/bin/vergil.bat does not properly handle -v. If you are running in a DOS shell, you could edit $PTII/bin/vergil.bat and remove the @echo off line Also, you will need to restart your DOS shell to see the new value of CLASSPATH. You can verify the value in a DOS shell with: echo %CLASSPATH% Try using $PTII/bin/vergil instead of vergil from within Cygwin bash. If you are still having problems, send me the contents of sh -x $PTII/bin/vergil -v For information about setting up copy and paste under bash, see http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII5.0/cygwin.htm Compiling RangeReader under DOS should not present a problem. Once you have the RangeReader .class file in the right place, then things should work. Feel free to send me email directly if you continue to have problems. BTW - Professor Lee and I were both C++ programmers when we first learned Java. We found the O'Reilly "Java in a nutshell" (http://www.oreilly.com/catalog/javanut3/) book to be very valuable. We were using the 1st ed., but I'm guessing the current version is quite good. In fact, if you click on the Edward's picture on his home page (http://ptolemy.eecs.berkeley.edu/~eal), you will see him reading that book. _Christopher ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]