Sorry for the previous messy reply. This is a clear version.

but now have a running problem:
C:\myclasses>java Test
Initializing the NLP tools ...
Exception in thread "main" java.lang.NoClassDefFoundError:
opennlp/tools/sentdet
ect/SentenceModel
        at Test.initialize(Test.java:42)
        at Test.main(Test.java:34)
Caused by: java.lang.ClassNotFoundException:
opennlp.tools.sentdetect.SentenceMo
del
        ... 2 more

if i run it by passing the parameter, i also got an error:
C:\myclasses>java -classpath opennlp-tools-1.5.0.jar Test
Exception in thread "main" java.lang.NoClassDefFoundError: Test
Caused by: java.lang.ClassNotFoundException: Test
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Test.  Program will exit.

Reply via email to