Difference between revisions of "Start Scripts"

From BaseX Documentation
Jump to navigation Jump to search
m (→‎Linux/Mac: politeness)
Line 38: Line 38:
  
 
# Run BaseX
 
# Run BaseX
java -cp "$BXPATH" $VM org.basex.XXX "$@"
+
java -cp "$BXPATH" $VM org.basex.REPLACEMODE "$@"
 
</pre>
 
</pre>
  
Note: You have to replace 'XXX' in the Java command line with the mode you want to start, which is either <code>BaseXServer</code>, <code>BaseXGUI</code>, or <code>BaseX</code>.
+
Note: Please replace 'REPLACEMODE' in the Java command line with the mode you want to start, which is either <code>BaseXServer</code>, <code>BaseXGUI</code>, or <code>BaseX</code>.
 
[[Category:Beginner]]
 
[[Category:Beginner]]

Revision as of 23:02, 18 January 2011

The start scripts mentioned in the startup overview are also distributed via the BaseX.zip or with the Windows Installer. They can be used for every mode of BaseX and started on every operating system. If you didn't download or can't find them you can use the scripts below.

All modes of BaseX can be started with the following scripts (you might need to modify the path to the BaseX.jar archive in the script):

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.REPLACEMODE "$@"

Note: Please replace 'REPLACEMODE' in the Java command line with the mode you want to start, which is either BaseXServer, BaseXGUI, or BaseX.