how to get exit code from JNI

L

Liang Zhang

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 (e-mail address removed)

SAP LABS CHINA : INNOVATE THE FUTURE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top