--- jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx.orig	2006-08-27 22:35:55.000000000 +0200
+++ jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx	2006-08-27 22:36:25.000000000 +0200
@@ -53,12 +53,8 @@
 char const* const* GnuInfo::getJavaExePaths(int * size)
 {
     static char const * ar[] = {
-        "gij",
-        "bin/gij",
-	"gij-4.1",
-	"bin/gij-4.1",
-	"gij-4.2",
-	"bin/gij-4.2",
+        "java",
+        "bin/java",
     };
     *size = sizeof (ar) / sizeof (char*);
     return ar;
@@ -69,9 +65,6 @@
     static char const* ar[]= {
           "/lib/" JFW_PLUGIN_ARCH "/client/libjvm.so",
           "/gcj-4.1.1/libjvm.so",
-	  "/gcj-4.1/libjvm.so",
-	  "/libgcj.so.8",
-	  "/libgcj.so.70",
           "/libgcj.so.7",
           "/libgcj.so.6"
     };
--- desktop/scripts/soffice.sh.orig	2006-09-23 16:42:54.000000000 +0200
+++ desktop/scripts/soffice.sh	2006-09-23 16:43:03.000000000 +0200
@@ -140,6 +140,9 @@
     ;;
 
   *)
+    if [[ "$(java-config -f)" =~ "gcj-jdk" ]]; then
+      LD_LIBRARY_PATH="$(java-config --jdk-home)/lib:${LD_LIBRARY_PATH}"
+    fi
     # this is a temporary hack until we can live with the default search paths
     if [ $LD_LIBRARY_PATH ]; then
       SYSTEM_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
