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

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

Used to be gsdl3.bat, before the shake-up.

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