Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » returning an exit code
returning an exit code [message #331387] Thu, 04 September 2008 08:59 Go to next message
Eclipse UserFriend
Originally posted by: subs._nospam_consertum.com

Hi,

Does anybody have any suggestions on how I might pass an 'exit code' to
a script that invokes eclipse?

I have written an Eclipse plugin that allows certain operations to be
performed in a 'batch' mode and then exit. This is working. I am trying
to find a way to pass the success/fail status to a shell script that
started Eclipse.

I have tried
System.setProperty("eclipse.exitcode", 999);
workbench.close() ;

but the exit code from the Eclipse executable is always zero. It seems
that Workbench#close() always sets the 'return code' to zero.

I am writing status information to a file, so I could add something to
that, but the script would then need to read the file (which I am trying
to avoid).

I had thought about using environment variables, but there is no way to
set one using Java.

Any other thoughts?

Thanks
--
Derek
Re: returning an exit code [message #331433 is a reply to message #331387] Fri, 05 September 2008 19:15 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
You will probably need to create your own Application. The workbench is
using IDEApplication. You could probably extend this and have your
start return an Integer(999)

-Andrew

Derek wrote:
> Hi,
>
> Does anybody have any suggestions on how I might pass an 'exit code' to
> a script that invokes eclipse?
>
> I have written an Eclipse plugin that allows certain operations to be
> performed in a 'batch' mode and then exit. This is working. I am trying
> to find a way to pass the success/fail status to a shell script that
> started Eclipse.
>
> I have tried
> System.setProperty("eclipse.exitcode", 999);
> workbench.close() ;
>
> but the exit code from the Eclipse executable is always zero. It seems
> that Workbench#close() always sets the 'return code' to zero.
>
> I am writing status information to a file, so I could add something to
> that, but the script would then need to read the file (which I am trying
> to avoid).
>
> I had thought about using environment variables, but there is no way to
> set one using Java.
>
> Any other thoughts?
>
> Thanks
Previous Topic:how to select row number in JFace TableViewer
Next Topic:[P2] Problem creating repository with .product when exporting for multiple platforms
Goto Forum:
  


Current Time: Fri Jul 12 11:32:12 GMT 2024

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

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

Back to the top