source: trunk/gsdl3/gs3-launch.bat@ 6439

Last change on this file since 6439 was 6439, checked in by mdewsnip, 20 years ago

A couple of small changes caused by the shake-up.

  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1@echo off
2
3
4:: -------- Launch the Greenstone 3 Digital Library Software --------
5
6if exist gs3-setup.bat goto start
7 echo This script must be run from within the Greenstone 3 home directory
8 pause
9 goto exit
10
11:start
12:: ---- Run setup.bat to set the necessary environment variables ----
13call gs3-setup.bat
14echo.
15set CATALINA_HOME=%GSDL3HOME%\comms\jakarta\tomcat
16set CATALINA_OPTS="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=%GSDL3HOME% -DGSDLOS=%GSDLOS% -DGSDLHOME= -DPATH=%PATH%"
17
18
19:findJava
20:: ---- Check Java SDK exists ----
21set JAVAPATH=
22
23:: Some users may set the above line manually
24if not "%JAVAPATH%" == "" goto testJava
25
26 :: If it is set, use the JAVA_HOME environment variable
27 if not "%JAVA_HOME%" == "" goto startTomcat
28
29 :: Look in the registry for Java SDK installations
30 type nul > jdk.reg
31 regedit /E jdk.reg "HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit"
32 type jdk.reg > jdk.txt
33 del jdk.reg
34
35 winutil\findjava.exe jdk.txt | winutil\setvar.exe JAVAPATH > setjava.bat
36 del jdk.txt
37 call setjava.bat
38 del setjava.bat
39
40 :: If a suitable installation was found in the registry, check it
41 if not "%JAVAPATH%" == "" goto testJava
42
43:noJava
44 echo.
45 echo Failed to locate an appropriate version of Java. You must install a
46 echo Java Development Kit (version 1.4 or greater) before running the
47 echo Greenstone 3 Digital Library Software.
48 pause
49 goto exit
50
51:testJava
52set JAVA_HOME=%JAVAPATH%
53
54
55:startTomcat
56:: ---- Start the Tomcat server ----
57call "%GSDL3HOME%\comms\jakarta\tomcat\bin\startup.bat"
58
59
60:: ---- Launch a web browser ----
61start http://localhost:8080/gsdl3
62
63
64:exit
Note: See TracBrowser for help on using the repository browser.