--- jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx~	2006-09-04 20:24:48.710718000 +0200
+++ jvmfwk/plugins/sunmajor/pluginlib/gnujre.cxx	2006-09-04 20:37:56.620718000 +0200
@@ -37,6 +37,11 @@
 #include "osl/thread.h"
 #include "gnujre.hxx"
 #include "util.hxx"
+extern "C"
+{
+#include <sys/utsname.h>
+#include <string.h>
+}
 
 using namespace rtl;
 using namespace std;
@@ -153,7 +158,18 @@
         return false;
 
     if (!m_sJavaHome.getLength())
+#if defined (__linux__) && defined (__i386__)
+    {
+       struct utsname uts;
+       uname(&uts);
+       if(!strcmp("x86_64",uts.machine))
+               m_sJavaHome = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///usr/lib32"));
+       else
+               m_sJavaHome = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///usr/lib"));
+    }
+#else
         m_sJavaHome = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///usr/lib"));
+#endif
 
     // init m_sRuntimeLibrary
     OSL_ASSERT(m_sHome.getLength());
