Dont know where I m going wrong

  • Laura_b

    Laura_b - 2006-02-05

    Hi I am new to wordnet and JWNL and am having a lot of difficulties getting started. 

    I have down loaded both jwnl13rc3_src and jwnl13rc3 and cannot get either to work. 

    With jwnl13rc3 I have set up the classpaths for all three .jars and imported them aswell.

    The example will only print out the usage line. 

    It compiles fine but wont initialize ("source code not available" object not in repository.

    When i try with jwnl13rc3_src instead, there are a number of errors with javax.xml.parsers.

    If any one will explain to me were I'm going wrong i would be extremely grateful as have spent a long time on this already!!!

    • Jim Irwin

      Jim Irwin - 2006-02-05

      First, if you are trying to use Wordnet 2.1 on Windows, then you will have to modify the source code as described in the thread "Wordnet 2.1 Compatibility?"

      Second, you have to set up the properties file.  Copy the sample "file_properties.xml" file and modify the "dictionary_path" parm value to point to the "dict" directory of your Wordnet installation.  The "dictionary_path" param is located about 5 lines up from the bottom of the file.  I called my example properties file "examples_properties.xml".  You can call yours whatever you want, but you have to name it on your command line when you run (see below).

      Third, set up a script or command file similar to the following (this sample command file runs on Windows) and run it in the directory where you have your utilities.jar file and commons-loggin.jar files from the jwnl13rc3 download.

      This forum doesn't preserve formatting well, so you may have to figure out the correct line breaks for the sample command file below.

      Sample command file

      set JAVA_HOME="C:\Program Files\Java\jre1.5.0_06"
      set JAVA=%JAVA_HOME%\bin\java.exe
      set CP="."

      rem ***
      rem *** Use the following if you built a new jwnl.jar file
      rem ***
      rem set CP=%CP%;jwnl.jar

      rem ***
      rem *** Otherwise, use the following if you built the classes in a directory structure.
      rem *** Change "c:\jwnl-build\bin" to your build directory.
      rem ***
      set CP=%CP%;C:\jwnl-build\bin

      rem ***
      rem *** Use the following regardless of how you build the classes.
      rem ***
      set CP=%CP%;utilities.jar
      set CP=%CP%;commons-logging.jar

      %JAVA% -classpath %CP% net.didion.jwnl.utilities.Examples examples_properties.xml

    • Laura_b

      Laura_b - 2006-02-05

      Thanks Jim


Log in to post a comment.