Calling native function within eclipse plugin [message #5105] |
Sun, 01 June 2008 06:02 |
Eclipse User |
|
|
|
Originally posted by: oren_b1.verifone.com
Hello,
I am trying to call a c++ function from dll within my eclipse plugin, and I
am using jni to do that (i don't know any other way to call c++ functions
from
java).
The code for invoking the c++ functions works on a regular java application
but when I am trying to use that code within my plugin I get the following
error message on the console:
#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d892b63, pid=9900,
tid=10632
#
# Java VM: Java HotSpot(TM) Client VM (1.6.0_02-b06 mixed mode)
# Problematic frame:
# V [jvm.dll+0xd2b63]
#
# An error report file with more information is saved as hs_err_pid9900.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
I have succeeded to bypass this problem in some cases by writing a class
which implements "IWorkbenchWindowActionDelegate" and invoking my c++
function within the run(IAction) function in new thread.
however, it's not always possible to use "IWorkbenchWindowActionDelegate"
because it's ment for gui events, I have also tried to create new thread not
within "IWorkbenchWindowActionDelegate" and it doesn't work.
Is there another class similar to "IWorkbenchWindowActionDelegate" but for
invoking within the code? or maybe some one know different solution ?
Thanks
Oren Barzilai
|
|
|
Powered by
FUDForum. Page generated in 0.03433 seconds