Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-224

Add /etc/alternatives/jre to the list of JAVA_HOME suggestions on Linux

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.7
    • 1.0.8
    • Jsvc
    • None
    • Linux

    Description

      On some flavors of Linux (e.g., openSUSE), the update-alternatives system is used to configure which JVM to use.

      On these systems, $JAVA_HOME can always be set to /etc/alternatives/jre.

      The following simple patch would add this to the list of places to look:

      Index: src/native/unix/native/location.c
      ===================================================================
      --- src/native/unix/native/location.c	(revision 1189876)
      +++ src/native/unix/native/location.c	(working copy)
      @@ -35,6 +35,7 @@
       #elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_BSD)
           "/usr/java",
           "/usr/local/java",
      +    "/etc/alternatives/jre",
       #elif defined(OS_CYGWIN)
           "/cygdrive/c/WINNT/system32/java",
       #elif defined(OS_SYSV)
      

      Attachments

        Activity

          People

            mturk@apache.org Mladen Turk
            archie172 Archie Cobbs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: