source: trunk/tools/showinf.bat @ 6192

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

Fix classpath problem with Windows batch files.

Line 
1@echo off
2
3rem showinf.bat: a batch file for displaying information about a given
4rem              image file, while displaying it in the image viewer
5
6rem Required JARs: loci_tools.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.formats.tools.ImageInfo
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 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" %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 and place in the same directory as the command line tools.
46
47:end
Note: See TracBrowser for help on using the repository browser.