Scott,

You're close, but missing some critical syntax.

Your invocation:

java -jar cygpath -m /usr/local/ags/libs/makeThumbs.jar

simply passes to the "java" command the "-jar" option and the argument strings "cygpath" "-m", etc.

You clearly want the to pass as arguments to "java" the result of _running_ the command "cygpath -m /usr/local/ags/libs/makeThumbs.jar". That's done like this:

java -jar "$(cygpath -m /usr/local/ags/libs/makeThumbs.jar)"


That should do what you want. Be sure that the arguments to cygpath are quoted, if necessary (in this case they aren't, but if you're, say, passing on arguments in a script context, be sure to use the quotes so as to prevent later baffling errors):

java -jar "$(cygpath -m "$jarFile")"

Note, too, that if you have a classpath variable in POSIX format (colons and no drive letters), you'll need to use something like "$(cygpath -pm "$POSIXCLASSPATH")" to convert it.


Only (_only_) Cygwin-linked code will understand the "/cygdrive/..." file names.


Randall Schulz


At 10:57 2003-01-27, Scott Purcell wrote:
I am having a hard time understanding the cygpath. I don't know why... But anyway. I am running Win2000.
I have created a executable jar file that lives at
/usr/local/ags/libs/test.jar

And jar is good and runs from a dos window if I move the test.jar to C:/

Anyway, I am trying to run it through cygwin so I am typing the following:

spurcell@DSGSTL-PC-1523 /cygdrive/c
$ java -jar cygpath -m /usr/local/ags/libs/makeThumbs.jar
Exception in thread "main" java.util.zip.ZipException: The system cannot find th
e file specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:105)
at java.util.jar.JarFile.<init>(JarFile.java:110)
at java.util.jar.JarFile.<init>(JarFile.java:52)

I have also tried

$ java -jar /cygdrive/usr/local/ags/libs/makeThumbs.jar
Exception in thread "main" java.util.zip.ZipException: The system cannot find th
e path specified
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:105)
at java.util.jar.JarFile.<init>(JarFile.java:110)
at java.util.jar.JarFile.<init>(JarFile.java:52)


I can't seem to get cygwin to run this. Could someone advise me on this.

Thanks,
Scott

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Reply via email to