Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Linux external tool - UNIXProcess.forkAndExec native error
Linux external tool - UNIXProcess.forkAndExec native error [message #70066] Tue, 10 June 2003 23:18 Go to next message
Eclipse UserFriend
Originally posted by: csconnea.us.ibm.com

I am trying to configure and run an external tool in Eclipse on RedHat
7.2 Pro.

I have a .sh file, HelloWorld.sh
contents:
/usr/IBM/ISIT/ISIJRE/bin/java HelloWorld

HelloWorld.java contents:
public class HelloWorld{
public static void main(String[] args){
System.out.println("HelloWorld");
}
}

When I run ./HelloWorld.sh from the command line, everything behaves as
expected.

When I configure an external tool to run HelloWorld.sh, I get the
following message on the Log Console:
Warning: UNIXProcess.forkAndExec native error: Exec format error

My external tool is configured as follows:
tool location: /usr/IBM/ISIT/eclipseSupport/HelloWorld.sh
Directory: /usr/IBM/ISIT/eclipseSupport
And HelloWorld.class exists in /usr/IBM/ISIT/eclipseSupport

This all came about because I am trying to implement an
ExternalToolBuilder. Everything works fine on Windows but breaks with
the same UNIXProcess.forkAndExec native error when I move to Linux.

Any ideas?

Thanks in advance!
Re: Linux external tool - UNIXProcess.forkAndExec native error [message #70937 is a reply to message #70066] Wed, 11 June 2003 14:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jared-eclipse.mn.rr.com

What version of Eclipse are you using?

- Jared

Colleen wrote:

> I am trying to configure and run an external tool in Eclipse on RedHat
> 7.2 Pro.
>
> I have a .sh file, HelloWorld.sh
> contents:
> /usr/IBM/ISIT/ISIJRE/bin/java HelloWorld
>
> HelloWorld.java contents:
> public class HelloWorld{
> public static void main(String[] args){
> System.out.println("HelloWorld");
> }
> }
>
> When I run ./HelloWorld.sh from the command line, everything behaves as
> expected.
>
> When I configure an external tool to run HelloWorld.sh, I get the
> following message on the Log Console:
> Warning: UNIXProcess.forkAndExec native error: Exec format error
>
> My external tool is configured as follows:
> tool location: /usr/IBM/ISIT/eclipseSupport/HelloWorld.sh
> Directory: /usr/IBM/ISIT/eclipseSupport
> And HelloWorld.class exists in /usr/IBM/ISIT/eclipseSupport
>
> This all came about because I am trying to implement an
> ExternalToolBuilder. Everything works fine on Windows but breaks with
> the same UNIXProcess.forkAndExec native error when I move to Linux.
>
> Any ideas?
>
> Thanks in advance!
Re: Linux external tool - UNIXProcess.forkAndExec native error [message #70971 is a reply to message #70937] Wed, 11 June 2003 15:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: csconnea.us.ibm.com

I'm using WSWB2.0, so Eclipse 2.0

Jared Burns wrote:
> What version of Eclipse are you using?
>
> - Jared
>
> Colleen wrote:
>
>
>>I am trying to configure and run an external tool in Eclipse on RedHat
>>7.2 Pro.
>>
>>I have a .sh file, HelloWorld.sh
>>contents:
>>/usr/IBM/ISIT/ISIJRE/bin/java HelloWorld
>>
>>HelloWorld.java contents:
>>public class HelloWorld{
>>public static void main(String[] args){
>>System.out.println("HelloWorld");
>>}
>>}
>>
>>When I run ./HelloWorld.sh from the command line, everything behaves as
>>expected.
>>
>>When I configure an external tool to run HelloWorld.sh, I get the
>>following message on the Log Console:
>>Warning: UNIXProcess.forkAndExec native error: Exec format error
>>
>>My external tool is configured as follows:
>>tool location: /usr/IBM/ISIT/eclipseSupport/HelloWorld.sh
>>Directory: /usr/IBM/ISIT/eclipseSupport
>>And HelloWorld.class exists in /usr/IBM/ISIT/eclipseSupport
>>
>>This all came about because I am trying to implement an
>>ExternalToolBuilder. Everything works fine on Windows but breaks with
>>the same UNIXProcess.forkAndExec native error when I move to Linux.
>>
>>Any ideas?
>>
>>Thanks in advance!
>
>
Re: Linux external tool - UNIXProcess.forkAndExec native error [message #71393 is a reply to message #70971] Wed, 11 June 2003 18:11 Go to previous message
Eclipse UserFriend
Originally posted by: csconnea.us.ibm.com

I figured it out. Runtime.exec doesn't like a call to HelloWorld.sh,
but it does like "sh HelloWorld.sh". And since the external tool is
using Runtime.exec()...

Colleen wrote:
> I'm using WSWB2.0, so Eclipse 2.0
>
> Jared Burns wrote:
>
>> What version of Eclipse are you using?
>>
>> - Jared
>>
>> Colleen wrote:
>>
>>
>>> I am trying to configure and run an external tool in Eclipse on RedHat
>>> 7.2 Pro.
>>>
>>> I have a .sh file, HelloWorld.sh
>>> contents:
>>> /usr/IBM/ISIT/ISIJRE/bin/java HelloWorld
>>>
>>> HelloWorld.java contents:
>>> public class HelloWorld{
>>> public static void main(String[] args){
>>> System.out.println("HelloWorld");
>>> }
>>> }
>>>
>>> When I run ./HelloWorld.sh from the command line, everything behaves as
>>> expected.
>>>
>>> When I configure an external tool to run HelloWorld.sh, I get the
>>> following message on the Log Console:
>>> Warning: UNIXProcess.forkAndExec native error: Exec format error
>>>
>>> My external tool is configured as follows:
>>> tool location: /usr/IBM/ISIT/eclipseSupport/HelloWorld.sh
>>> Directory: /usr/IBM/ISIT/eclipseSupport
>>> And HelloWorld.class exists in /usr/IBM/ISIT/eclipseSupport
>>>
>>> This all came about because I am trying to implement an
>>> ExternalToolBuilder. Everything works fine on Windows but breaks with
>>> the same UNIXProcess.forkAndExec native error when I move to Linux.
>>>
>>> Any ideas?
>>>
>>> Thanks in advance!
>>
>>
>>
>
Previous Topic:request "AbstractOpenWizardAction" move to API
Next Topic:Opening an editor redux
Goto Forum:
  


Current Time: Fri Apr 26 20:46:05 GMT 2024

Powered by FUDForum. Page generated in 0.02803 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top