delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/08/25/19:04:16

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Date: Wed, 25 Aug 2004 19:02:18 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
cc: Ramneek Singh <ramneek AT cisco DOT com>
Subject: Re: Problem with Classpath for java thru perl script
In-Reply-To: <Pine.GSO.4.61.0408251852370.6014@slinky.cs.nyu.edu>
Message-ID: <Pine.GSO.4.61.0408251901390.6014@slinky.cs.nyu.edu>
References: <004101c48af1$6ea07f20$0ea96b80 AT amer DOT cisco DOT com> <Pine DOT GSO DOT 4 DOT 61 DOT 0408251852370 DOT 6014 AT slinky DOT cs DOT nyu DOT edu>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Wed, 25 Aug 2004, Igor Pechtchanski wrote:

> On Wed, 25 Aug 2004, Ramneek Singh wrote:
> 
> > Hi ,
> > 
> > I just installed cygwin on windows 2000. 
> > I need it to run a perl script which will execute a java command .
> > Example: in the script it says thefollowing:
> > 
> > java -classpath $CLASSPATH myprogram argument1 arg2
> > 
> > 
> > The problem is that though echo $CLASSPATH shows the correct classpath
> > to the jar
> > Files , example C:\abc\def\myfile.jar  , when the perl script is run it
> > complains:
> > 
> > C:abcdefmyfile.jar not found
> > 
> > Notice in above the \ was stripped.
> > My java program is compiled with the C:\abc\def\myfiile.jar style of
> > classpath.
> > 
> > How can I get this to work ?
> 
> You didn't say exactly how you're invoking the java process, so depending 
> on what you do, there may be multiple solutions.  If you use system(), 
> either quote the '\'s by using more '\'s (see the perl manpage) or set 
> CLASSPATH in the environment, or use a suitably modified version of the 
> java wrapper script that I posted to this list earlier (see 
> <http://cygwin.com/ml/cygwin/2003-01/msg00174.html>).
> 	Igor

...or use forward slashes ('/'), which Java should understand with no 
problems.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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