|Using RCP and JNI results in NoClassDefFoundError [message #467515]
||Fri, 04 May 2007 23:56
Registered: July 2009
I know this has been asked before but I haven't been able to find a working solution.|
I want to create a RCP application that allows me to use a JNI that we have created. I have .jar and a .dll for that JNI. I created a snippet that I ran as a java application and that was fine. I tried to move it into a one view RCP and it fails (it also fails when I tried to create a plugin and ran the workbench).
It fails with:
Whenever it gets to:
I have tried putting it in many places including my dervived classes: WorkbenchAdvisor::preStartup, WorkbenchAdivsor::postStartup, IPlatformRunnable::run, and even in the view createPartControl (though I know that's not where it belongs). I have no problem importing the classes and writing the code - it is all recognized and compiles.
(My project name is RCP_JNI and my package is rcp_jni.)
I have tried:
* loading the dll first with: System.loadLibrary("JniDSDll");
* added the library JniDS.jar in my Properties->Java Build Path->libraries tab
* put the dll in the following directories: eclipse/plugins, RCP_JNI, RCP_JNI/src,
* added vm arguments in the run configurations to be:
* imported the JniDS package in the dependencies tab of my plugin.xml
I couldn't see anything obvious to add to my .classpath because I already had:
<classpathentry kind="lib" path="JniDS.jar"/>
and was unable to figure out a way to explicitly add the dll.
I also added
<classpathentry exported="true" kind="lib" path="os/win32/x86" sourcepath="os/win32/x86"/>
Any and all help is greatly appreciated.
Powered by FUDForum
. Page generated in 0.02090 seconds