source: trunk/tools/editor.bat @ 6182

Revision 6182, 1.7 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 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
17
18if "%LOCI_DEVEL%" == "" (
19  rem Developer environment variable unset; look for proper libraries
20  if not exist "%DIR%ome-editor.jar" goto missing
21  if not exist "%DIR%ome-java.jar" goto missing
22  if not exist "%DIR%ome-java-deprecated.jar" goto missing
23  if exist "%DIR%loci_tools.jar" goto found
24  if exist "%DIR%bio-formats.jar" goto found
25  goto missing
26) else (
27  rem Developer environment variable set; try to launch
28  java -mx512m %PROG% %*
29  goto end
30)
31
32:found
33rem Library found; try to launch
34java -mx512m -cp "%DIR%";"%DIR%bio-formats.jar";"%DIR%loci_tools.jar";"%DIR%ome-editor.jar";"%DIR%ome-java.jar";"%DIR%ome-java-deprecated.jar" %PROG% %*
35goto end
36
37:missing
38echo Required JAR libraries not found. Please download:
39echo   loci_tools.jar
40echo from:
41echo   http://www.loci.wisc.edu/bio-formats/downloads
42echo as well as the OME Metadata Notebook JARs from:
43echo   http://www.loci.wisc.edu/software/daily/ome-editor.jar
44echo   http://www.loci.wisc.edu/software/daily/ome-java.jar
45echo   http://www.loci.wisc.edu/software/daily/ome-java-deprecated.jar
46echo and place in the same directory as the command line tools.
47echo.
48echo Please note that the OME Metadata Notebook is legacy software that
49echo has been discontinued. Use at your own risk."
50
51:end
Note: See TracBrowser for help on using the repository browser.