| 
| returning an exit code [message #331387] | Thu, 04 September 2008 04:59  |  | 
| Eclipse User  |  |  |  |  | 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 15:15  |  | 
| Eclipse User  |  |  |  |  | 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
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.03294 seconds