Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > how to get exit code from JNI

Reply
Thread Tools

how to get exit code from JNI

 
 
Liang Zhang
Guest
Posts: n/a
 
      07-14-2006
Hi, All
in my project, i need to call a java method from C code using JNI, yet I do
not know how to
retrieve the exit code of java program. the java code is like below
.....
public static void main(....)
{
......

if(error){
System.exit(-77);// the exit code is -77
.....
}
and the JNI c code may like below
......
/* Invoke main method. */
(*env)->CallStaticVoidMethod(env, mainClass, mainID, mainArgs);
//here I want to retrieve the exit code from java to check if there is an
error
....
--

any suggestions? thanks



--

Best Regards

Liang Zhang

Developer
SAP Labs China

T: +86 21 61006699-7775
F: +86 21 65984520
Email

SAP LABS CHINA : INNOVATE THE FUTURE


 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      07-14-2006
* Liang Zhang:
> in my project, i need to call a java method from C code using JNI


And why are you posting that question in a C++ group?

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
I don't get why sys.exit(1) doesn't exit the while loop in the follow case chad Python 14 10-13-2010 09:08 AM
Can I get the exit code "n" passed to sys.exit(n) ? Yujo Python 2 04-10-2007 08:35 PM
Exit code of a batch (using exit /B) Joe Smith Java 4 11-08-2006 12:25 PM
Code to Exit Web App and Exit Internet Explorer =?Utf-8?B?U2FuZHk=?= ASP .Net 7 08-05-2005 01:55 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57