Hello all, 

Thank for all of your replies. 

I got a clue from your replies, the error must be about Perl environment and
the shell environment. 

According to the document:
http://www.perl.com/doc/manual/html/pod/perlrun.html, I added 

$ENV{PATH} = '/bin:/usr/bin';    # or whatever you need
$ENV{SHELL} = '/bin/sh' if exists $ENV{SHELL};

to the top of the script, it works in Eclipse+EPIC+cygwin. 

Thanks for all of your help. 

Jing 


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Brian Raven
Sent: Thursday, 11 September 2008 1:33 a.m.
To: perl-win32-users@listserv.ActiveState.com
Subject: RE: Run perl on window using cygwin+Eclipse+EPIC

Sisyphus <> wrote:
> ----- Original Message -----
> From: "Jing LI" <[EMAIL PROTECTED]> .
> .
>> It uses find to find a type of file in a directory and its
>> subdirectories: 
>> 
>> my @jarfiles = split(' ',`find $bin_location -name "*.jar"`);
>> 
>> But when run or debug it in Eclipse, it has error:
>> sh: find: No such file or directory.
>> 
> 
> I believe that error message is being produced by your
> C:/cygwin/bin/find.exe - which means that find.exe is being found ok.
> The problem appears to be that the directory $bin_location is not
> being found.   

I don't think so. If that were the case I would expect the error message
to be something like "find: fred: No such file or directory". That it
starts "sh:" suggests that is coming from the shell, or something
pretending to be the shell. What I find puzzling is that if the shell
could not find the find executable, I would expect to see something like
"sh: find: command not found". If that were the case I would suggest the
OP printing the output from `echo $PATH`, or even `env`, as perl may not
be running the shell that you think it is, or its environment may not be
what you expect.

> What does the variable $bin_location contain ? If it's a location
> that means something only to Cygwin (such as anything that begins
> with /usr, /cygdrive/c, or ~/) then it probably needs to be changed
> into a location that windows can make sense of.   
> 
> Sorry - I don't know what eclipse is.

I know what it is, but that is about my limit.

HTH

-- 
Brian Raven 

----------------------------------------------------------------------------
-------------------------------
This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient or have received this e-mail in error, please
advise the sender immediately by reply e-mail and delete this message and
any attachments without retaining a copy. Any unauthorised copying,
disclosure or distribution of the material in this e-mail is strictly
forbidden.


_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to