source: trunk/tools/bfview.bat @ 6192

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

Fix classpath problem with Windows batch files.

Line 
1@echo off
2
3rem bfview.bat: a batch file for displaying an image file in the image viewer
4
5rem Required JARs: loci_tools.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.formats.gui.ImageViewer
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 exist "%DIR%loci_tools.jar" goto found
26  if exist "%DIR%bio-formats.jar" goto found
27  goto missing
28) else (
29  rem Developer environment variable set; try to launch
30  java -mx512m %PROG% %*
31  goto end
32)
33
34:found
35rem Library found; try to launch
36java -mx512m -cp "%DIR1%";"%DIR%bio-formats.jar";"%DIR%loci_tools.jar" %PROG% %*
37goto end
38
39:missing
40echo Required JAR libraries not found. Please download:
41echo   loci_tools.jar
42echo from:
43echo   http://www.loci.wisc.edu/bio-formats/downloads
44echo and place in the same directory as the command line tools.
45
46:end
Note: See TracBrowser for help on using the repository browser.