delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/27/14:12:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.2.0.9.2.20030127110753.027a0b00@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Mon, 27 Jan 2003 11:13:32 -0800
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: cygwin path problems
In-Reply-To: <34385CBC5E8E664EB0007814636AB36A20F9DF@exchange1.dimension
s.com>
Mime-Version: 1.0

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 AT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019