Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Cannot call Eclipse -JNI-> C -JNI-> Java?
Cannot call Eclipse -JNI-> C -JNI-> Java? [message #1750426] Wed, 21 December 2016 00:07
Jim Steed is currently offline Jim SteedFriend
Messages: 6
Registered: December 2016
Junior Member
I am creating a custom widget using the JNI. I can display the widget ok. All the C code works in the JNI. When I double click on something I want to open another editor in Eclipse. To do that I have to call a Java function (so Java calls C, and then C calls Java). But I get this error during the JNI call to CallVoidMethod. It never enters my Java routine from C. I am using Eclipse 4.6.1 and JRE8.

# A fatal error has been detected by the Java Runtime Environment:
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6403daa6, pid=8308, tid=25536
# JRE version: Java(TM) SE Runtime Environment (8.0_66-b18) (build 1.8.0_66-b18)
# Java VM: Java HotSpot(TM) Client VM (25.66-b18 mixed mode windows-x86 )
# Problematic frame:
# V [jvm.dll+0x7daa6]
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
# An error report file with more information is saved as:
# c:\gedev_gui\gedev\user\nt\hs_err_pid8308.log
# If you would like to submit a bug report, please visit:

Here is my code:

javaClass3 = (*env)->FindClass(env, "com/my/editors/Editor1");
if (javaClass3 == NULL) {
if ((*env)->ExceptionOccurred(env))
printf("javaClass3 is null but no exception was thrown\n");
} else {
javaClass2 = (jclass) (*env)->NewGlobalRef(env,javaClass3);
mid2 = (*env)->GetMethodID(env, javaClass2, "openMyEditor", "(I)V"); //"(Ljava/lang/String;)V");
if (mid2) {
printf("CallVoidMethod\n"); fflush(stdout);
printf("mid2 %p\n",mid); fflush(stdout);
env2 = env;

[Updated on: Wed, 21 December 2016 00:11]

Report message to a moderator

Previous Topic:Have the same plugin but different
Next Topic:Donation Issues
Goto Forum:

Current Time: Sun Sep 23 02:09:08 GMT 2018

Powered by FUDForum. Page generated in 0.04609 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top