updated analogous to main version
This commit is contained in:
parent
68afc702b8
commit
fec67f3fe3
2 changed files with 161 additions and 32 deletions
|
@ -1,18 +1,92 @@
|
|||
@echo off
|
||||
|
||||
rem Batch file for starting Hop with a JDK-like virtual machine.
|
||||
|
||||
rem Set Helma TCP ports
|
||||
set WEB_PORT=8080
|
||||
set XMLRPC_PORT=8081
|
||||
|
||||
rem Set Classpath
|
||||
set JARS=lib\helma.jar;lib\crimson.jar;lib\village.jar;lib\servlet.jar;lib\jetty.jar
|
||||
set JARS=%JARS%;lib\mckoidb.jar
|
||||
set JARS=%JARS%;lib\regexp.jar;lib\netcomponents.jar;lib\jimi.jar;lib\apache-dom.jar
|
||||
set JARS=%JARS%;lib\mail.jar;lib\activation.jar;lib\mysql.jar;lib\jdom.jar;lib\minml.jar
|
||||
|
||||
echo Starting Web server on port %WEB_PORT%
|
||||
echo Starting XML-RPC server on port %XMLRPC_PORT%
|
||||
|
||||
java -classpath %JARS% helma.main.Server -w %WEB_PORT% -x %XMLRPC_PORT%
|
||||
@echo off
|
||||
rem Batch file for Starting Helma with a JDK-like virtual machine.
|
||||
|
||||
:: Initialize variables
|
||||
:: (don't touch this section)
|
||||
set HTTP_PORT=
|
||||
set XMLRPC_PORT=
|
||||
set AJP13_PORT=
|
||||
set RMI_PORT=
|
||||
set HOP_HOME=
|
||||
set JAVA_HOME=
|
||||
set OPTIONS=
|
||||
|
||||
:: Set TCP ports for Helma servers
|
||||
:: (comment/uncomment to de/activate)
|
||||
set HTTP_PORT=8080
|
||||
rem set XMLRPC_PORT=8081
|
||||
rem set AJP13_PORT=8009
|
||||
rem set RMI_PORT=5050
|
||||
|
||||
:: Uncomment to set HOP_HOME
|
||||
rem set HOP_HOME=c:\program files\helma
|
||||
|
||||
:: Uncomment to set JAVA_HOME variable
|
||||
rem set JAVA_HOME=c:\program files\java
|
||||
|
||||
:: Uncomment to pass options to the Java virtual machine
|
||||
rem set JAVA_OPTIONS=-server -Xmx128m
|
||||
|
||||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
:::::: No user configuration needed below this line :::::::
|
||||
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
|
||||
:: Setting the script path
|
||||
set SCRIPT_DIR=%~d0%~p0
|
||||
|
||||
:: Using JAVA_HOME variable if defined. Otherwise,
|
||||
:: Java executable must be contained in PATH variable
|
||||
if "%JAVA_HOME%"=="" goto default
|
||||
set JAVACMD=%JAVA_HOME%\bin\java
|
||||
goto end
|
||||
:default
|
||||
set JAVACMD=java
|
||||
:end
|
||||
|
||||
:: Setting HOP_HOME to script path if undefined
|
||||
if "%HOP_HOME%"=="" (
|
||||
set HOP_HOME=%SCRIPT_DIR%
|
||||
)
|
||||
|
||||
:: Setting the classpath
|
||||
set LIB=%SCRIPT_DIR%lib
|
||||
set JARS=%LIB%\helma.jar
|
||||
set JARS=%JARS%;%LIB%\jetty.jar
|
||||
set JARS=%JARS%;%LIB%\crimson.jar
|
||||
set JARS=%JARS%;%LIB%\xmlrpc.jar
|
||||
set JARS=%JARS%;%LIB%\village.jar
|
||||
set JARS=%JARS%;%LIB%\servlet.jar
|
||||
set JARS=%JARS%;%LIB%\regexp.jar
|
||||
set JARS=%JARS%;%LIB%\netcomponents.jar
|
||||
set JARS=%JARS%;%LIB%\jimi.jar
|
||||
set JARS=%JARS%;%LIB%\apache-dom.jar
|
||||
set JARS=%JARS%;%LIB%\jdom.jar
|
||||
set JARS=%JARS%;%LIB%\mail.jar
|
||||
set JARS=%JARS%;%LIB%\activation.jar
|
||||
set JARS=%JARS%;%LIB%\mysql.jar
|
||||
set JARS=%JARS%;%LIB%\mckoidb.jar
|
||||
|
||||
:: Setting Helma server options
|
||||
if not "%HTTP_PORT%"=="" (
|
||||
echo Starting HTTP server on port %HTTP_PORT%
|
||||
set OPTIONS=%OPTIONS% -w %HTTP_PORT%
|
||||
)
|
||||
if not "%XMLRPC_PORT%"=="" (
|
||||
echo Starting XML-RPC server on port %XMLRPC_PORT%
|
||||
set OPTIONS=%OPTIONS% -x %XMLRPC_PORT%
|
||||
)
|
||||
if not "%AJP13_PORT%"=="" (
|
||||
echo Starting AJP13 listener on port %AJP13_PORT%
|
||||
set OPTIONS=%OPTIONS% -jk %AJP13_PORT%
|
||||
)
|
||||
if not "%RMI_PORT%"=="" (
|
||||
echo Starting RMI server on port %RMI_PORT%
|
||||
set OPTIONS=%OPTIONS% -p %RMI_PORT%
|
||||
)
|
||||
if not "%HOP_HOME%"=="" (
|
||||
echo Serving applications from %HOP_HOME%
|
||||
set OPTIONS=%OPTIONS% -h %HOP_HOME%
|
||||
)
|
||||
|
||||
:: Invoking the Java virtual machine
|
||||
%JAVACMD% %JAVA_OPTIONS% -classpath %JARS% helma.main.Server %OPTIONS%
|
||||
|
|
|
@ -1,27 +1,82 @@
|
|||
#!/bin/sh
|
||||
# Shell script for starting Helma with a JDK-like virtual machine.
|
||||
# Presumes that you have your classpath set.
|
||||
|
||||
# set Helma TCP ports
|
||||
WEB_PORT=8080
|
||||
# uncomment to set JAVA_HOME variable
|
||||
# JAVA_HOME=/usr/lib/java
|
||||
|
||||
# uncomment to set HOP_HOME, otherwise we get it from the script path
|
||||
# HOP_HOME=/usr/local/helma
|
||||
|
||||
# options to pass to the Java virtual machine
|
||||
# JAVA_OPTIONS="-server -Xmx128m"
|
||||
|
||||
# Set TCP ports for Helma servers
|
||||
# (comment/uncomment to de/activate)
|
||||
HTTP_PORT=80
|
||||
XMLRPC_PORT=8081
|
||||
# AJP13_PORT=8009
|
||||
# RMI_PORT=5050
|
||||
|
||||
# if JAVA_HOME variable is set, use it. Otherwise, java executable
|
||||
###########################################################
|
||||
###### No user configuration needed below this line #######
|
||||
###########################################################
|
||||
|
||||
# if JAVA_HOME variable is set, use it. Otherwise, Java executable
|
||||
# must be contained in PATH variable.
|
||||
if [ "$JAVA_HOME" ]; then
|
||||
JAVACMD="$JAVA_HOME"/bin/java
|
||||
if [ "$JAVA_HOME" ]; then
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
else
|
||||
JAVACMD=java
|
||||
fi
|
||||
|
||||
# set classpath
|
||||
JARS=lib/helma.jar:lib/crimson.jar:lib/village.jar:lib/servlet.jar:lib/jetty.jar
|
||||
# get HOP_HOME variable if it isn't set
|
||||
if test -z "$HOP_HOME"; then
|
||||
# try to get HOP_HOME from script file and pwd
|
||||
# strip everyting behind last slash
|
||||
HOP_HOME="${0%/*}"
|
||||
cd $HOP_HOME
|
||||
HOP_HOME=$PWD
|
||||
else
|
||||
cd $HOP_HOME
|
||||
fi
|
||||
echo "Starting Helma in directory $HOP_HOME"
|
||||
|
||||
# Set classpath
|
||||
JARS=lib/helma.jar
|
||||
JARS=$JARS:lib/jetty.jar
|
||||
JARS=$JARS:lib/crimson.jar
|
||||
JARS=$JARS:lib/xmlrpc.jar
|
||||
JARS=$JARS:lib/village.jar
|
||||
JARS=$JARS:lib/servlet.jar
|
||||
JARS=$JARS:lib/netcomponents.jar
|
||||
JARS=$JARS:lib/jimi.jar
|
||||
JARS=$JARS:lib/apache-dom.jar
|
||||
JARS=$JARS:lib/jdom.jar
|
||||
JARS=$JARS:lib/regexp.jar
|
||||
JARS=$JARS:lib/mail.jar
|
||||
JARS=$JARS:lib/activation.jar
|
||||
JARS=$JARS:lib/mysql.jar
|
||||
JARS=$JARS:lib/mckoidb.jar
|
||||
JARS=$JARS:lib/regexp.jar:lib/netcomponents.jar:lib/jimi.jar:lib/apache-dom.jar
|
||||
JARS=$JARS:lib/mail.jar:lib/activation.jar:lib/mysql.jar:lib/jdom.jar:lib/minml.jar
|
||||
|
||||
echo Starting Web server on port $WEB_PORT
|
||||
echo Starting XML-RPC server on port $XMLRPC_PORT
|
||||
if [ "$HTTP_PORT" ]; then
|
||||
SWITCHES="$SWITCHES -w $HTTP_PORT"
|
||||
echo Starting HTTP server on port $HTTP_PORT
|
||||
fi
|
||||
if [ "$XMLRPC_PORT" ]; then
|
||||
SWITCHES="$SWITCHES -x $XMLRPC_PORT"
|
||||
echo Starting XML-RPC server on port $XMLRPC_PORT
|
||||
fi
|
||||
if [ "$AJP13_PORT" ]; then
|
||||
SWITCHES="$SWITCHES -jk $AJP13_PORT"
|
||||
echo Starting AJP13 listener on port $AJP13_PORT
|
||||
fi
|
||||
if [ "$RMI_PORT" ]; then
|
||||
SWITCHES="$SWITCHES -p $RMI_PORT"
|
||||
echo Starting RMI server on port $RMI_PORT
|
||||
fi
|
||||
if [ "$HOP_HOME" ]; then
|
||||
SWITCHES="$SWITCHES -h $HOP_HOME"
|
||||
fi
|
||||
|
||||
# launch
|
||||
$JAVACMD -classpath $CLASSPATH:$JARS helma.main.Server -w $WEB_PORT -x $XMLRPC_PORT
|
||||
# Invoking the Java VM
|
||||
$JAVACMD $JAVA_OPTIONS -classpath $CLASSPATH:$JARS helma.main.Server $SWITCHES
|
||||
|
|
Loading…
Add table
Reference in a new issue