--- commons-daemon-1.0.5-src/src/native/unix/native/location.c.org	2010-10-16 14:16:26.000000000 +0200
+++ commons-daemon-1.0.5-src/src/native/unix/native/location.c	2013-03-06 11:34:30.000000000 +0100
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-/* @version $Id: location.c 1023267 2010-10-16 12:16:26Z mturk $ */
+/* @version $Id: location.c 1453272 2013-03-06 10:34:31Z mturk $ */
 #include "jsvc.h"
 
 /* Locations of various JVM files. We have to deal with all this madness since
@@ -33,8 +33,20 @@
     "/System/Library/Frameworks/JavaVM.framework/Home",
     "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/",
 #elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD)
+    "/usr/java/default",
     "/usr/java",
     "/usr/local/java",
+    "/usr/lib/jvm/default-java",
+    "/usr/lib/jvm/java",
+    "/etc/alternatives/java_sdk",
+    "/etc/alternatives/java_sdk_openjdk",
+    "/etc/alternatives/jre",
+#if defined(__LP64__)
+    "/lib64/jvm/java",
+    "/lib64/jvm/java-openjdk",
+#endif
+    "/lib/jvm/java",
+    "/lib/jvm/java-openjdk",
 #elif defined(OS_CYGWIN)
     "/cygdrive/c/WINNT/system32/java",
 #elif defined(OS_SYSV)
@@ -44,6 +56,8 @@
     "/usr/opt/java142",
     "/usr/opt/java13",
 #elif defined(OS_HPUX)
+    "/opt/java6",
+    "/opt/java1.5",
     "/opt/java1.4",
     "/opt/java1.3",
 #endif
@@ -70,16 +84,12 @@
 char *location_jvm_default[] = {
 #if defined(OS_DARWIN)
     "$JAVA_HOME/../Libraries/libjvm.dylib",
+    "$JAVA_HOME/jre/lib/server/libjvm.dylib",
+    "$JAVA_HOME/jre/lib/client/libjvm.dylib",
 #elif defined(OS_CYGWIN)
     "$JAVA_HOME/jre/bin/classic/jvm.dll",               /* Sun JDK 1.3 */
     "$JAVA_HOME/jre/bin/client/jvm.dll",                /* Sun JDK 1.4 */
 #elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD) || defined(OS_SYSV) || defined(OS_FREEBSD) || defined(OS_TRU64)
-#if defined(HAVE_SABLEVM)
-    "$JAVA_HOME/lib/libsablevm.so",                     /* sableVM */
-#endif
-#if defined(HAVE_KAFFEVM)
-    "$JAVA_HOME/jre/lib/" CPU "/libkaffevm.so",         /* kaffe */
-#endif
     "$JAVA_HOME/jre/lib/" CPU "/classic/libjvm.so",     /* Sun JDK 1.2 */
     "$JAVA_HOME/jre/lib/" CPU "/server/libjvm.so",      /* Sun JDK 1.4 */
     "$JAVA_HOME/jre/lib/" CPU "/client/libjvm.so",      /* Sun JDK 1.3 */
@@ -117,10 +127,10 @@
     "$JAVA_HOME/lib/" CPU "/fast64/libjvm.so",
     "$JAVA_HOME/lib/" CPU "/fast32/libjvm.so",
 #elif defined(OS_HPUX)
-    "$JAVA_HOME/jre/lib/" CPU "/server/libjvm.sl",
-    "$JAVA_HOME/jre/lib/" CPU "/client/libjvm.sl",
-    "$JAVA_HOME/jre/lib/" CPU "/hotspot/libjvm.sl",
-    "$JAVA_HOME/jre/lib/" CPU "/classic/libjvm.sl",
+    "$JAVA_HOME/jre/lib/" CPU "/server/libjvm." SO_EXT,
+    "$JAVA_HOME/jre/lib/" CPU "/client/libjvm." SO_EXT,
+    "$JAVA_HOME/jre/lib/" CPU "/hotspot/libjvm." SO_EXT,
+    "$JAVA_HOME/jre/lib/" CPU "/classic/libjvm." SO_EXT,
 #endif
     "/usr/lib/libgcj.so.7",     /* gcc java libraries */
     "/usr/lib/libgcj.so.6",
@@ -140,8 +150,8 @@
     "$JAVA_HOME/jre/lib/" CPU "/$VM_NAME/libjvm.so",    /* Sun JDK 1.3 */
     "$JAVA_HOME/lib/" CPU "/$VM_NAME/libjvm.so",        /* Sun JRE 1.3 */
 #elif defined(OS_HPUX)
-    "$JAVA_HOME/jre/lib/" CPU "/$VM_NAME/libjvm.sl",
-    "$JAVA_HOME/lib/" CPU "/$VM_NAME/libjvm.sl",
+    "$JAVA_HOME/jre/lib/" CPU "/$VM_NAME/libjvm." SO_EXT,
+    "$JAVA_HOME/lib/" CPU "/$VM_NAME/libjvm." SO_EXT,
 #elif defined(OS_SYSV)
     "$JAVA_HOME/jre/lib/" CPU "/$VM_NAME/dce_threads/libjvm.so",
     "$JAVA_HOME/jre/lib/" CPU "/$VM_NAME/green_threads/libjvm.so",
