Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8023979

The JRE and JDK installers for Linux should use " update-alternatives "

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 7-pool
    • 7
    • install
    • None

      A DESCRIPTION OF THE REQUEST :
      If I install a HotSpot JRE or JDK on a typical Linux system (e.g. at least RedHat, Fecora, and Ubuntu), the java commands are not on the standard command path. To get them to appear on the PATH, I either need to explicitly add
       " /usr/java/bin " to PATH or use " update-alternatives " to configure each of the java commands.

      JUSTIFICATION :
      Setting PATH doesn't help if scripts refer to the Java commands using absolute paths.

      Running 20 odd " update-alternatives --config " commands each time I install or update a Java Hotspot installation is a poor solution ...

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The installer should test to see if " alternatives " is used on the distro; e.g. check to see if " /etc/alternatives " exists. If it is, then it should use " update-alternatives --config " to configure the Java commands and utilities, and (at the user's discretion) select them as default.

      Alternatively, just include a shell script in the installed " bin " directory that the user can run to do the work.

            dmalav Dinesh Malav (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: