Difference between revisions of "Start Scripts"
Jump to navigation
Jump to search
Line 44: | Line 44: | ||
==BaseX JAX-RX Server== | ==BaseX JAX-RX Server== | ||
− | The scripts for starting the [[JAX-RX API|JAX-RX | + | The scripts for starting the [[JAX-RX API|JAX-RX Server]] can be found below. |
===Windows=== | ===Windows=== | ||
Line 93: | Line 93: | ||
# Run code | # Run code | ||
java -cp "$CP" $VM org.basex.api.jaxrx.JaxRxServer "$@" | java -cp "$CP" $VM org.basex.api.jaxrx.JaxRxServer "$@" | ||
+ | </pre> | ||
+ | |||
+ | ==BaseX HTTP Server== | ||
+ | The scripts for starting the HTTP server, which allows access to the [[REST]] and [[WebDAV]] services, can be found below. | ||
+ | |||
+ | ===Windows=== | ||
+ | |||
+ | <pre class="brush:bash"> | ||
+ | @echo off | ||
+ | setlocal | ||
+ | |||
+ | REM Path to this script | ||
+ | set PWD=%~dp0 | ||
+ | |||
+ | REM Paths to distributed files or source directories | ||
+ | set BASEX=%PWD%/../../basex/target/classes | ||
+ | set BASEXAPI=%PWD%/../target/classes | ||
+ | |||
+ | REM Classpath | ||
+ | set LIB=%PWD%/../lib | ||
+ | set CP=%BASEX%;%BASEXAPI%;%LIB%/commons-fileupload-1.2.2.jar;%LIB%/jetty-6.1.26.jar;%LIB%/jetty-util-6.1.26.jar;%LIB%/lucene-analyzers-3.0.2.jar;%LIB%/milton-api-1.6.4.jar;%LIB%/resolver.jar;%LIB%/servlet-api-2.5-20081211.jar;%LIB%/snowball.jar;%LIB%/tagsoup-1.2.jar | ||
+ | |||
+ | REM Options for virtual machine | ||
+ | set VM=-Xmx512m | ||
+ | |||
+ | REM Run code | ||
+ | java -cp "%CP%;." %VM% org.basex.api.BaseXHTTP %* | ||
+ | </pre> | ||
+ | |||
+ | ===Linux/Mac=== | ||
+ | |||
+ | <pre class="brush:bash"> | ||
+ | #!/bin/bash | ||
+ | |||
+ | # Path to this script | ||
+ | PWD=`dirname $0` | ||
+ | |||
+ | # Paths to distributed files or source directories | ||
+ | BASEX=$PWD/../../basex/target/classes | ||
+ | BASEXAPI=$PWD/../target/classes | ||
+ | |||
+ | # Classpath | ||
+ | LIB=$PWD/../lib | ||
+ | CP=$BASEX:$BASEXAPI:$LIB/commons-fileupload-1.2.2.jar:$LIB/jetty-6.1.26.jar:$LIB/jetty-util-6.1.26.jar:$LIB/lucene-analyzers-3.0.2.jar:$LIB/milton-api-1.6.4.jar:$LIB/resolver.jar:$LIB/servlet-api-2.5-20081211.jar:$LIB/snowball.jar:$LIB/tagsoup-1.2.jar | ||
+ | |||
+ | # Options for virtual machine | ||
+ | VM=-Xmx512m | ||
+ | |||
+ | # Run code | ||
+ | java -cp "$CP" $VM org.basex.api.BaseXHTTP "$@" | ||
</pre> | </pre> | ||
[[Category:JAX-RX]] | [[Category:JAX-RX]] | ||
+ | [[Category:REST]] | ||
[[Category:Beginner]] | [[Category:Beginner]] | ||
[[Category:Developer]] | [[Category:Developer]] |
Revision as of 17:43, 12 September 2011
The following scripts, which are mentioned on the Startup and Startup Options pages, are also included in the official releases. You might need to modify the path to the BaseX directory to get them running.
Contents
BaseX Main Package
Windows
@setlocal @echo off REM Path to this script set PWD=%~dp0 REM Paths to distributed files or source directories set BXPATH=basex.jar REM Options for virtual machine set VM=-Xmx1g REM Run BaseX java -cp "%BXPATH%" %VM% org.basex.XXX %*
Linux/Mac
#!/bin/bash # Path to this script PWD=`dirname $0` # Paths to distributed files or source directories BXPATH=basex.jar # Options for virtual machine VM=-Xmx1g # Run BaseX java -cp "$BXPATH" $VM org.basex.XXX "$@"
Note: Please replace XXX
with either BaseXServer
, BaseXClient
, BaseX
, or BaseXGUI
.
BaseX JAX-RX Server
The scripts for starting the JAX-RX Server can be found below.
Windows
@setlocal @echo off REM Path to this script set PWD=%~dp0 REM Paths to distributed files or source directories set BASEX=%PWD%/basex-%BXVERSION%.jar set BASEXAPI=%PWD%/basex-api-%BXVERSION%.jar REM Classpath set LIB=%PWD%/../lib set CP=%BASEX%;%BASEXAPI%;%LIB%/jax-rx-1.2.9.jar;%LIB%/jetty-6.1.25.jar;%LIB%/jetty-util-6.1.25.jar; set CP=%CP%;%LIB%/servlet-api-2.5-20081211.jar;%LIB%/jersey-server-1.4.jar;%LIB%/jersey-core-1.4.jar;%LIB%/asm-3.1.jar REM Options for virtual machine set VM=-Xmx512m REM Run code java -cp "%CP%" %VM% org.basex.api.jaxrx.JaxRxServer %*
Linux/Mac
#!/bin/bash # Path to this script PWD=`dirname $0` # Paths to distributed files or source directories BASEX=$PWD/basex.jar BASEXAPI=$PWD/basex-api.jar # Classpath LIB=$PWD/../lib CP=$BASEX:$BASEXAPI:$LIB/jax-rx-1.2.9.jar:$LIB/jetty-6.1.25.jar:$LIB/jetty-util-6.1.25.jar: CP=$CP:$LIB/servlet-api-2.5-20081211.jar:$LIB/jersey-server-1.4.jar:$LIB/jersey-core-1.4.jar:$LIB/asm-3.1.jar # Options for virtual machine VM=-Xmx512m # Run code java -cp "$CP" $VM org.basex.api.jaxrx.JaxRxServer "$@"
BaseX HTTP Server
The scripts for starting the HTTP server, which allows access to the REST and WebDAV services, can be found below.
Windows
@echo off setlocal REM Path to this script set PWD=%~dp0 REM Paths to distributed files or source directories set BASEX=%PWD%/../../basex/target/classes set BASEXAPI=%PWD%/../target/classes REM Classpath set LIB=%PWD%/../lib set CP=%BASEX%;%BASEXAPI%;%LIB%/commons-fileupload-1.2.2.jar;%LIB%/jetty-6.1.26.jar;%LIB%/jetty-util-6.1.26.jar;%LIB%/lucene-analyzers-3.0.2.jar;%LIB%/milton-api-1.6.4.jar;%LIB%/resolver.jar;%LIB%/servlet-api-2.5-20081211.jar;%LIB%/snowball.jar;%LIB%/tagsoup-1.2.jar REM Options for virtual machine set VM=-Xmx512m REM Run code java -cp "%CP%;." %VM% org.basex.api.BaseXHTTP %*
Linux/Mac
#!/bin/bash # Path to this script PWD=`dirname $0` # Paths to distributed files or source directories BASEX=$PWD/../../basex/target/classes BASEXAPI=$PWD/../target/classes # Classpath LIB=$PWD/../lib CP=$BASEX:$BASEXAPI:$LIB/commons-fileupload-1.2.2.jar:$LIB/jetty-6.1.26.jar:$LIB/jetty-util-6.1.26.jar:$LIB/lucene-analyzers-3.0.2.jar:$LIB/milton-api-1.6.4.jar:$LIB/resolver.jar:$LIB/servlet-api-2.5-20081211.jar:$LIB/snowball.jar:$LIB/tagsoup-1.2.jar # Options for virtual machine VM=-Xmx512m # Run code java -cp "$CP" $VM org.basex.api.BaseXHTTP "$@"