#! /bin/bash

function addjars {
  for file in `ls -1 $1/*.jar 2> /dev/null`; do
    if [ -z "$CLASSPATH" ]; then
      CLASSPATH="$file"
    else
      CLASSPATH="$file:$CLASSPATH"
    fi
  done
}


JMX_HOME=/usr/local/jmx-1.2
addjars $JMX_HOME/lib

MX4J=/usr/local/mx4j-1.1.1
addjars $MX4J/lib

export CLASSPATH

java $@