[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

System.exit(0)  - basic JNI problem

Posted on 2004-11-02
6
Medium Priority
?
821 Views
Last Modified: 2008-03-04
Hi there,

I open C++ GUI application from Java (using JNI native call). When user clicks "x" and closes GUI application, I'd like to shutdown JVM also. In my code, when user clicks "x", C++ side calls Java method (that contains System.exit(0) call) and this results in the java.exe - Application Error: "The instruction at 0x0 referenced at 0x0. The memory couldn't be read".

I use Jace to handle JNI calls but this sounds like a pure JNI problem.

Many thanks in advance.

Kalle.
0
Comment
Question by:kalle73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 24

Expert Comment

by:sciuriware
ID: 12471278
Could you just do      exit(0); from C++?
;JOOP!
0
 

Author Comment

by:kalle73
ID: 12471343
But I need to close JVM also.
0
 
LVL 24

Accepted Solution

by:
sciuriware earned 400 total points
ID: 12471370
No it's alltogether only one program.
;JOOP!
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:kalle73
ID: 12471416
right you are, so simple
0
 

Author Comment

by:kalle73
ID: 12471420
Thanks
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 12471430
My pleasure,

;JOOP!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question