Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 853
  • Last Modified:

System.exit(0) - basic JNI problem

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
kalle73
Asked:
kalle73
  • 3
  • 3
1 Solution
 
sciuriwareCommented:
Could you just do      exit(0); from C++?
;JOOP!
0
 
kalle73Author Commented:
But I need to close JVM also.
0
 
sciuriwareCommented:
No it's alltogether only one program.
;JOOP!
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
kalle73Author Commented:
right you are, so simple
0
 
kalle73Author Commented:
Thanks
0
 
sciuriwareCommented:
My pleasure,

;JOOP!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now