source: trunk/tools/notes.bat @ 6192

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

Fix classpath problem with Windows batch files.

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