C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

how to get exit code from JNI

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Liang Zhang
Guest





PostPosted: Fri Jul 14, 2006 7:05 am    Post subject: how to get exit code from JNI Reply with quote



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 liang.zhang (AT) sap (DOT) com

SAP LABS CHINA : INNOVATE THE FUTURE
Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.