[ 
https://issues.apache.org/jira/browse/OPENNLP-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974482#action_12974482
 ] 

James Kosin commented on OPENNLP-44:
------------------------------------

Jorn,

In windows, the path to the java.exe file to run the class should already be 
setup correctly when the JRE is installed.  You just need to use 'java' 
executable.  Windows doesn't really have a 'whereis' type function to tell you 
the path, it usually handles the finding of the executable itself and will tell 
you if it can not find the executable.

A quick note, the above doesn't work on my system asis; which is why my 
non-standard method of invoking.  The JRE complains like below:
C:\Users\James Kosin\Documents\NetBeansProjects\trunk\opennlp-tools>java 
-Xmx4096m -jar target\opennlp-tools-1.5.1-incubating-SNAPSHOT.jar
Exception in thread "main" java.lang.NoClassDefFoundError: 
opennlp/model/EventStream
        at opennlp.tools.cmdline.CLI.<clinit>(CLI.java:107)
Caused by: java.lang.ClassNotFoundException: opennlp.model.EventStream
        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)
        ... 1 more
Could not find the main class: opennlp.tools.cmdline.CLI. Program will exit.

C:\Users\James Kosin\Documents\NetBeansProjects\trunk\opennlp-tools>

This may be related to another user who complained that they had to unpack the 
jar file to get the cmd line to work.

-James

> Add an bin/opennlp.bat start file for windows users
> ---------------------------------------------------
>
>                 Key: OPENNLP-44
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-44
>             Project: OpenNLP
>          Issue Type: Improvement
>          Components: Command Line Interface
>            Reporter: Jörn Kottmann
>
> There should be an opennlp.bat file to start opennlp the same way on windows 
> as the "bin/opennlp" shell script on unix like systems does.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to