You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by co...@apache.org on 2016/12/27 03:00:16 UTC
[3/3] opennlp git commit: Fix the Brat and Morfologik .bat launchers
Fix the Brat and Morfologik .bat launchers
Fixed the .bat scripts that launches brat and morfologik CLI.
See issue OPENNLP-895
Project: http://git-wip-us.apache.org/repos/asf/opennlp/repo
Commit: http://git-wip-us.apache.org/repos/asf/opennlp/commit/b1218790
Tree: http://git-wip-us.apache.org/repos/asf/opennlp/tree/b1218790
Diff: http://git-wip-us.apache.org/repos/asf/opennlp/diff/b1218790
Branch: refs/heads/trunk
Commit: b12187901442f51f18ea5582ae53bf9b973f09b0
Parents: 30eb9d9
Author: William Colen <co...@apache.org>
Authored: Tue Dec 27 00:58:49 2016 -0200
Committer: William Colen <co...@apache.org>
Committed: Tue Dec 27 00:58:49 2016 -0200
----------------------------------------------------------------------
.../src/main/bin/brat-annotation-service.bat | 10 +++++++---
.../src/main/bin/morfologik-addon.bat | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/opennlp/blob/b1218790/opennlp-brat-annotator/src/main/bin/brat-annotation-service.bat
----------------------------------------------------------------------
diff --git a/opennlp-brat-annotator/src/main/bin/brat-annotation-service.bat b/opennlp-brat-annotator/src/main/bin/brat-annotation-service.bat
index 06a626a..1db08a7 100755
--- a/opennlp-brat-annotator/src/main/bin/brat-annotation-service.bat
+++ b/opennlp-brat-annotator/src/main/bin/brat-annotation-service.bat
@@ -38,10 +38,14 @@ IF "%OPENNLP_HOME%" == "" (
REM # Keep OPENNLP_HOME to short-name without spaces
FOR %%A IN ("%OPENNLP_HOME%") DO SET OPENNLP_HOME=%%~sfA
)
+setLocal EnableDelayedExpansion
+set CLASSPATH="
-REM # Get the library JAR file name (JIRA OPENNLP-554)
-FOR %%A IN ("%OPENNLP_HOME%\lib\*.jar") DO SET JAR_FILE=%%A
+FOR %%A IN ("%OPENNLP_HOME%\lib\*.jar") DO (
+ set CLASSPATH=!CLASSPATH!;%%A
+)
+set CLASSPATH=!CLASSPATH!"
-%JAVA_CMD% -Xmx1024m -jar %JAR_FILE% opennlp.bratann.NameFinderAnnService %*
+%JAVA_CMD% -Xmx1024m -cp %CLASSPATH% opennlp.bratann.NameFinderAnnService %*
ENDLOCAL
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/opennlp/blob/b1218790/opennlp-morfologik-addon/src/main/bin/morfologik-addon.bat
----------------------------------------------------------------------
diff --git a/opennlp-morfologik-addon/src/main/bin/morfologik-addon.bat b/opennlp-morfologik-addon/src/main/bin/morfologik-addon.bat
index aeec31f..79833c0 100644
--- a/opennlp-morfologik-addon/src/main/bin/morfologik-addon.bat
+++ b/opennlp-morfologik-addon/src/main/bin/morfologik-addon.bat
@@ -38,10 +38,14 @@ IF "%OPENNLP_HOME%" == "" (
REM # Keep OPENNLP_HOME to short-name without spaces
FOR %%A IN ("%OPENNLP_HOME%") DO SET OPENNLP_HOME=%%~sfA
)
+setLocal EnableDelayedExpansion
+set CLASSPATH="
-REM # Get the library JAR file name (JIRA OPENNLP-554)
-FOR %%A IN ("%OPENNLP_HOME%\lib\*.jar") DO SET JAR_FILE=%%A
+FOR %%A IN ("%OPENNLP_HOME%\lib\*.jar") DO (
+ set CLASSPATH=!CLASSPATH!;%%A
+)
+set CLASSPATH=!CLASSPATH!"
-%JAVA_CMD% -Xmx1024m -jar %JAR_FILE% %*
+%JAVA_CMD% -Xmx1024m -cp %CLASSPATH% opennlp.morfologik.cmdline.CLI %*
ENDLOCAL
\ No newline at end of file