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;${CLASSPATH}"

[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.1E\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/ptII5.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:/Ptolemy/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-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.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

--------

    Thanks for the reply.  I created a CLASSPATH system environment variable
    with the path c:\Ptolemy\ptII5.0-beta\poi\poi-2.5.1-final-20040804.jar.  I
    get the same error.
    
    I had not been using a CLASSPATH environment variable, but instead putting
    the classpath on the javac command line to make sure that was not causing m
   y
    problem.  Does Ptolemy look at this variable when it runs to see where to
    find .jar files?
    
    Also, vergil -v gives me an error of "Cannot set parameter -v when no value
    is given".  If I try to give it a value, I get "Failed to parse -v 1,
    Unrecognized option.  No parameter exists with name v"
    
    A bit more information:
    
    I am running on Win XP.  I recompiled Ptolemy under cygwin using the
    instructions on the website.  However, I compile RangeReader with the DOS
    command line instead of cygwin and make to minimize the number of things I'
   m
    using without fully understanding.
    
    Any more suggestions?
    
    
    -----Original Message-----
    
    Hi Wayne,
    
    This is a classpath problem.
    
    You could try adding
    c:\Ptolemy\ptII5.0-beta\poi\poi-2.5.1-final-20040804.jar
    to your CLASSPATH environment variable.
    
    To do this permanently under Windows XP, Click on "Start" and then right
    click on the "My Computer" menu choice and select "properties".
    
    The System Properties Window will come up.
    In that window, select Advanced and then Environment Variables
    
    In the Environment Variables window, look for the CLASSPATH variable, it is
    probably already in the "System Variables" section.
    
    Select the CLASSPATH variable, and hit edit and then add your jar file.
    Note that you should use semicolons to separate the jar from the other
    elements in your CLASSPATH.
    
    
    Under Cygwin bash, you could add to your classpath temporarily with
    
    
        export
    "CLASSPATH=c:/Ptolemy/ptII5.0-beta/poi/poi-2.5.1-final-20040804.jar;${CLASS
   P
    ATH}"
    
    However, you would need to do this each time you start up a bash shell.
    
    
    When you run vergil, if you run it with the -v option it will show you the
    classpath:
        
        vergil -v
    
    _Christopher
    
    Christopher Brooks (cxh at eecs berkeley edu) University of California
    Programmer/Analyst Chess/Ptolemy/Trust        US Mail: 558 Cory Hall #1770
    ph: 510.643.9841 fax:510.642.2739         Berkeley, CA 94720-1770
    home: (F-Tu) 707.665.0131 (W-F) 510.655.5480  (office: 400A Cory)
    
    
    
--------

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to