#!/bin/csh -f
#
#	CVS ID: Conductor,v 1.6 2005/11/29 01:25:10 castalia Exp
#
# Conductor
#
# A wrapper for the Java process management application.
#
# Use:
#
#	Conductor [-P] <pipeline> [-C <config file>] [-Monitor]
#

#	Apple's OS X JVM won't allow Java classes to be run remotely
#	if they employ any graphics (Swing) functionality
#	regardless of whether this functionally is actually used.
#	The workaround is to tell the JVM to run "headless" when
#	the monitor mode is not specified on the command line.
set Graphics_Mode = -Djava.awt.headless=true
foreach arg ($argv)
	if ("$arg" =~ -[Mm]*) then
		set Graphics_Mode = ""
		break
	endif
end

exec java $Graphics_Mode \
	-cp /opt/java:/opt/java/mysql-connector:/opt/java/jcm \
	PIRL/Conductor/Conductor $argv:q
