#21 loadLibrary usage - call location in Java code

1.11 Accepted

I'm currenly using jacob and I'd like to be able to
pass at runtime the location of jacob.dll. For this
I've added a jacob.dll.location property which is
honored by ActiveXComponent and Dispatch.

The problem I found is that

static {

was in many classes, my question is (please forgive my
ignorance since I'm quite new to the jni stuff):

Does this need to be in many places? Is there as single
entry point to jacob so that loadLibrary can handled there?


  • clay_shooter

    clay_shooter - 2006-09-23

    Logged In: YES

    The code is in many places because there originally wasn't a
    superclass for all the Java classes and you never knew which
    one was going to get loaded first. The load library could
    be moved to the JacobObject class which was made the the
    root of most others in release 1.9. That would reduce the
    number of places loadLibrary was called.

  • clay_shooter

    clay_shooter - 2006-09-23

    Logged In: YES

    LoadLibrary calls in the HEAD of the source tree have been
    moved to a single location. Non JacobObject subclasses will
    call a magic static method on Jacobobject to get the DLL
    loaded. This probably could be done with a class ref but
    the current implementation is known to work well

  • clay_shooter

    clay_shooter - 2006-09-23
    • summary: loadLibrary usage --> loadLibrary usage - call location in Java code
    • status: open --> pending
  • clay_shooter

    clay_shooter - 2006-09-23
    • milestone: --> 1.11 Accepted
  • SourceForge Robot

    • status: pending --> closed
  • SourceForge Robot

    Logged In: YES

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks