--- bin/findbugs2.orig	2009-08-21 20:39:53 UTC
+++ bin/findbugs2
@@ -27,27 +27,11 @@ done
 dir=`dirname "$program"`
 findbugs_home="$dir/.."
 
-# Handle FHS-compliant installations (e.g., Fink)
-if [ -d "$findbugs_home/share/findbugs" ]; then
-	findbugs_home="$findbugs_home/share/findbugs"
-fi
-
 # Make absolute
 findbugs_home=`cd "$findbugs_home" && pwd`
 
 fb_pathsep=':'
 
-# Handle cygwin, courtesy of Peter D. Stout
-fb_osname=`uname`
-if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
-	findbugs_home=`cygpath --mixed "$findbugs_home"`
-	fb_pathsep=';'
-fi
-# Handle MKS, courtesy of Kelly O'Hair
-if [ "${fb_osname}" = "Windows_NT" ]; then
-	fb_pathsep=';'
-fi
-
 if [ ! -d "$findbugs_home" ]; then
 	echo "The path $findbugs_home,"
 	echo "which is where I think FindBugs is located,"
@@ -56,14 +40,7 @@ if [ ! -d "$findbugs_home" ]; then
 fi
 
 # Choose default java binary
-fb_javacmd=java
-if [ ! -z "$JAVA_HOME" ] && [ -x "$JAVA_HOME/bin/java" ]; then
-	if [ `expr "$fb_osname" : CYGWIN` -ne 0 ]; then
-		fb_javacmd=`cygpath --mixed "$JAVA_HOME"`/bin/java
-	else
-		fb_javacmd="$JAVA_HOME/bin/java"
-	fi
-fi
+fb_javacmd="%%LOCALBASE%%/bin/java"
 
 # Default UI is GUI2
 fb_launchui="2"
@@ -133,7 +110,7 @@ while [ $# -gt 0 ] && [ "$finishedArgs" = "false" ]; d
 			jvm_user_props="-D$1 $jvm_user_props"
 			shift
 			;;
-	
+
 		-D*=*)
 			jvm_user_props="$1 $user_props"
 			shift
@@ -158,18 +135,10 @@ while [ $# -gt 0 ] && [ "$finishedArgs" = "false" ]; d
 
 done
 
-# Extra JVM args for MacOSX.
-if [ $fb_osname = "Darwin" ]; then
-	fb_jvmargs="$fb_jvmargs \
-		-Xdock:name=FindBugs -Xdock:icon=${findbugs_home}/lib/buggy.icns \
-		-Dapple.laf.useScreenMenuBar=true"
-fi
-
 #
 # Launch JVM
 #
 exec "$fb_javacmd" \
-	-classpath "$fb_appjar$fb_pathsep$CLASSPATH" \
 	-Dfindbugs.home="$findbugs_home" \
 	$jvm_debug $jvm_maxheap $jvm_ea $jvm_conservespace $jvm_user_props \
 	-Dfindbugs.launchUI=$fb_launchui \
