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

Add variables to OS X during JRE installation

XMLWordPrintable

    • x86_64
    • os_x

      A DESCRIPTION OF THE REQUEST :
      For OS X Java /Oracle offers 2 JRE installers.

      One will install the Java Plugin in /library/Internet Plugins/, the other will install the JRE in the /library/java/JavaVirtualMachines/ .

      Both installs contain the file structure like the Linux installer archive does. You can open thePlugin as a folder & browse it or you can browse the JRE in /library/java/virtualMachines &past .../home/ it will look like the Linux file structure.

      I have decided that for my homemade solution , the best installer would be the Disk Image (dmg) which installs the Internet plugin version which contains a control panel & can update itself over the manual installer in an compressed archive which installs the /library/java/virtualMachines/jre-x.y.z.jre where x.y.z is the version number for following reasons ;

      the file structure keeps unchanged after updating for the Internetplugins version where for the more Unix like /library/java/virtualMachines/ version it changes because it contains the version number.






      JUSTIFICATION :
      I am helped with manually adding the variables but i think your installer should add them so every Mac user would be helped.

      If there is a reason why you don't add these variables (security) i would like to be informed so i can undo my changes. I then suggest you create an helper app to open jar files with that temporarily & for the jar file only creates these variables in a 'sandbox'

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The Java Application should open
      ACTUAL -
      Mac OS X asks to install Java to run the Application even with Java already installed.

      ---------- BEGIN SOURCE ----------
      No code
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      What needs to be done is to add/alter some system variables:

      Set JAVA_HOME.

      bash shells:

      'export JAVA_HOME=jre-install-dir
      export PATH=$JAVA_HOME/bin:$PATH'

      In my case:

      'export JAVA_HOME=/library/Internet Plug-ins/JavaAppletPlugin.plugin/Contents/Home
      export PATH=$/library/Internet Plug-ins/JavaAppletPlugin.plugin/Contents/Home/bin:$PATH'

      Now you can use java from the command line for running unmacified java applications or Badly macified without a correct wrapper.

            pbhat Pranav Bhat (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: