source: trunk/tools/bfview.bat @ 6182

Revision 6182, 1.1 KB checked in by curtis, 10 years ago (diff)

Fix up logging with Bio-Formats command line tools.
This removes the hard dependency on log4j in Bio-Formats, so it should be
possible to log with other logging frameworks via SLF4J now. There is also
a log4j configuration filein the tools folder now, which should make it easier
to configure output for debugging, stack traces, etc.

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
16
17if "%LOCI_DEVEL%" == "" (
18  rem Developer environment variable unset; look for proper libraries
19  if exist "%DIR%loci_tools.jar" goto found
20  if exist "%DIR%bio-formats.jar" goto found
21  goto missing
22) else (
23  rem Developer environment variable set; try to launch
24  java -mx512m %PROG% %*
25  goto end
26)
27
28:found
29rem Library found; try to launch
30java -mx512m -cp "%DIR%";"%DIR%bio-formats.jar";"%DIR%loci_tools.jar" %PROG% %*
31goto end
32
33:missing
34echo Required JAR libraries not found. Please download:
35echo   loci_tools.jar
36echo from:
37echo   http://www.loci.wisc.edu/bio-formats/downloads
38echo and place in the same directory as the command line tools.
39
40:end
Note: See TracBrowser for help on using the repository browser.