[CCC DEV] JNI - Native Calls to WinSparkle.dll

Dave Gilmore gilmorenator at gmail.com
Tue Jul 13 19:09:17 BST 2010


On 13 July 2010 16:42, Dave Gilmore <gilmorenator at gmail.com> wrote:
> I'll keep y'all posted

Ok so I've made some progress in the write direction,

Here is what I have done:

1) Changed the package file structure and renamed jeditsparkleplugin
to jeditwinsparkleplugin.
2) Modified the C code in WinSparkle.dll so it calls the set_url
function during init() - This means we do not need to pass any
parameters etc :-) and only need to call one function
3) Hard coded the url to one on my local machine at the moment
4) Created the c/c++ JNI bindings header file :-) Whoooop!

I have a further problem now when actually trying to use the plugin in
jedit, the error message it reports is:

C:\Users\DAVE\.jedit\jars\JEditWinSparklePlugin.jar:
Cannot start: java.lang.UnsatisfiedLinkError:
org.transterpreter.jeditwinsparkleplugin.JEditWinSparklePlugin.win_sparkle_init()V
Try updating to a newer version of the plugin.

Now I've never created a Jedit plugin so it could be something I'm doing wrong.

I just put the .jar (2kb) in the .jar folder - do i also need to pop
the dll and header file in there also?

The other thing I thought it might be is that the java code can't find
the WinSparkle.dll file - I'm currently using the System.loadlibrary
method this possibly could be solved by specificity the full path to
the library and using System.load

I've updated the code at [1] to reflect the changes and would
appreciate any guidance,

Sorry about all the questions and issues, most of this is unexplored
territory for me - we'll get there in the end I'm sure,

Cheers,

Dave

[1] http://projects.cs.kent.ac.uk/projects/kroc/trac/browser/kroc/trunk/tools/winupdater




More information about the developers mailing list