source: trunk/tools/editor.bat @ 6192

Revision 6192, 1.8 KB checked in by curtis, 10 years ago (diff)

Fix classpath problem with Windows batch files.

Line 
1@echo off
2
3rem editor.bat: a batch file for launching the OME Metadata Editor
4
5rem Required JARs: loci_tools.jar, ome-editor.jar,
6rem                ome-java.jar, ome-java-deprecated.jar
7
8rem JAR libraries must be in the same directory as this
9rem command line script for the command to function.
10
11rem If you are a developer working from source and have
12rem the LOCI classes in your CLASSPATH, you can set the
13rem LOCI_DEVEL environment variable to use them instead.
14
15set PROG=loci.ome.editor.MetadataEditor
16set DIR=%~dp0
17if "%DIR:~1%" == ":\" (
18  set DIR1=%DIR%
19) else (
20  rem Remove trailing backslash
21  set DIR1=%DIR:~0,-1%
22)
23
24if "%LOCI_DEVEL%" == "" (
25  rem Developer environment variable unset; look for proper libraries
26  if not exist "%DIR%ome-editor.jar" goto missing
27  if not exist "%DIR%ome-java.jar" goto missing
28  if not exist "%DIR%ome-java-deprecated.jar" goto missing
29  if exist "%DIR%loci_tools.jar" goto found
30  if exist "%DIR%bio-formats.jar" goto found
31  goto missing
32) else (
33  rem Developer environment variable set; try to launch
34  java -mx512m %PROG% %*
35  goto end
36)
37
38:found
39rem Library found; try to launch
40java -mx512m -cp "%DIR1%";"%DIR%bio-formats.jar";"%DIR%loci_tools.jar";"%DIR%ome-editor.jar";"%DIR%ome-java.jar";"%DIR%ome-java-deprecated.jar" %PROG% %*
41goto end
42
43:missing
44echo Required JAR libraries not found. Please download:
45echo   loci_tools.jar
46echo from:
47echo   http://www.loci.wisc.edu/bio-formats/downloads
48echo as well as the OME Metadata Notebook JARs from:
49echo   http://www.loci.wisc.edu/software/daily/ome-editor.jar
50echo   http://www.loci.wisc.edu/software/daily/ome-java.jar
51echo   http://www.loci.wisc.edu/software/daily/ome-java-deprecated.jar
52echo and place in the same directory as the command line tools.
53echo.
54echo Please note that the OME Metadata Notebook is legacy software that
55echo has been discontinued. Use at your own risk."
56
57:end
Note: See TracBrowser for help on using the repository browser.