#!/bin/sh

#
# Script to launch java applications in a BOINC environment
#

set +v

libdcapi-jre=`sed -n '/^<soft_link>/ s/<[^>]*>//gp' libdcapi-jre.tar`
app-jar=`sed -n '/^<soft_link>/ s/<[^>]*>//gp' Uppercase.jar`

[ -d jre ] || gunzip -c "$libdcapi-jre" | tar xf -

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib
export LD_LIBRARY_PATH

exec ./jre/bin/java -jar "$app-jar"
