• 2 replies
  • Latest Post - ‏2009-09-26T00:31:15Z by SystemAdmin
9 Posts

Pinned topic How to use NameWorks Scoring class?

‏2008-12-03T16:04:16Z |
I am trying to write a very simple Java program that uses the NameWorks Scoring class. This program fails on the statement that constructs the Scoring object:

Scoring scoring = 

new Scoring(nwConfigFile);

The exception that is thrown is:

UnsatisfiedLinkError:  swig_module_init At (Native Method)

In the statement to run this Java program, I do include the following clause to access the NameWorks .DLL files (where non-Java native methods are located):


This clause was needed to successfully run one of the sample programs, NameParserCLU.jar, as follows:

java  -Djava.library.path=”C:\IBM\GNR\GNM\bin”  -jar NameParserCLU.jar

What .DLL or other file do I need to resolve this error?
Updated on 2009-09-26T00:31:15Z at 2009-09-26T00:31:15Z by SystemAdmin
  • SystemAdmin
    9 Posts

    Re: How to use NameWorks Scoring class?

    Unix builds of npclu have a number of external shared-library dependencies. Most of the time, the necessary libraries should already be in the library search path. If not, the libraries that npclu needs are as follows:
    1. On Solaris, using the Forte6 build:,,,,, and
    2. On Solaris, using the GNU 3.2 build:,,,, and
    3. On (Red Hat) Linux, using the GNU 3.2 build:,,,,, and

    For NameParserCLU: If you are running it self-contained so that it calls NameParser through its Java interface, make sure that the appropriate DLL is in your library search path.

    java sudoku
  • SystemAdmin
    9 Posts

    Re: How to use NameWorks Scoring class?

    I didn't see a line where you load the scoring library (okay, it's really an archive):

    public class MyScoringClass {
    static {

    Note: the above call to loadLibrary() assumes that libscoring.a is in your loader's path. For Unix I would just set LD_LIBRARY_PATH=<GNR HOME>/lib. I'm not sure what to do on Windows.

    I hope this helps.