--- desktop/scripts/soffice.sh.java32_64	2005-09-08 19:02:48.000000000 +0200
+++ desktop/scripts/soffice.sh	2005-09-19 15:27:10.000000000 +0200
@@ -147,6 +147,15 @@
     ;;
 esac
 
+# 32-bit JAVA kludge for x86_64 platforms with native JRE
+if [ "`uname -m`" = "x86_64" -a -n "$JAVA32_HOME" ]; then
+    case `/usr/bin/file "$sd_prog/$sd_binary"` in
+    *"ELF 32"*)
+        export JAVA_HOME=$JAVA32_HOME
+        ;;
+    esac
+fi
+
 # extend the ld_library_path for java: javaldx checks the sofficerc for us
 if [ -x "$sd_prog/javaldx" ] ; then
     java_ld_library_path=`"$sd_prog/javaldx"`
