+#
+# test which classlibrary was used
+# depending on whether classpath or openjdk class library was used we may expect different results from the tests, this may e.g.
+# by simple things like intentation when printing stack traces or even more subtile stuff ...
+#
+$JAVA -XX:+PrintConfig 2>&1 | grep gnu.classpath.boot.library.path: > /dev/null
+if [ $? -eq "0" ]; then
+IS_CLASSPATH=1
+POSTFIX="cp"
+fi
+$JAVA -XX:+PrintConfig 2>&1 | grep sun.boot.library.path > /dev/null
+if [ $? -eq "0" ]; then
+IS_OPENJDK=1
+POSTFIX="ojdk"
+fi
+
+if [ -z $POSTFIX ]; then
+echo "Warning: Could not detect classlibrary the java VM uses, assuming openJDK"
+POSTFIX="ojdk"
+fi
+
+# mostly classpath and openjdk deliver same results
+REFERENCE_OUTPUT=$SRCDIR/$TEST.output
+REFERENCE_2OUTPUT=$SRCDIR/$TEST.2output
+
+# if they do not exist, we try the postfixed versions
+if [ ! -f $REFERENCE_OUTPUT ]; then
+REFERENCE_OUTPUT=$SRCDIR/$TEST.output.$POSTFIX
+fi
+if [ ! -f $REFERENCE_2OUTPUT ]; then
+REFERENCE_2OUTPUT=$SRCDIR/$TEST.2output.$POSTFIX
+fi
+