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

Extension-Installation fails because of limitations in jar utility

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P1 P1
    • 1.3.1_01
    • 1.3.0
    • deploy
    • None
    • fcs
    • sparc
    • solaris_2.6

      The Java 3D group is working to support the new JPI 1.3 auto-install feature. It works perfectly on Windows but fails on Solaris due to permission problems.

      When I put the installer into a jar file it has execute permission, but when it's unjarred, it is no longer executable. This causes the following error message in the Java Console:

      java.io.FileNotFoundException: /opt/NSCPcom/java3d1_2_1beta1-solsparc-rt-ia.bin (Permission denied)

      That file (java3d1_2_1beta1-solsparc-rt-ia.bin) is our executable GUI installer. After verifying the signature, the JPI unjars it to /opt/NSCPcom and then tries to execute it due to the following line in the jar's manifest file:

      Extension-Installation: java3d1_2_1beta1-solsparc-rt-ia.bin

      We have developed a test platform for this feature. Get a Windows machine with Java 1.3 installed and Java 3D not installed, and go to this URL:

        http://flute.eng/HelloUniverse_plugin.html

      The JPI will ask for permission, download the installer and run it, installing Java 3D, and then run the app.

      Now repeat the process on a Solaris machine, again, with Java 1.3 installed and Java 3D not installed. Use the same URL (a different jar file is downloaded on Solaris systems). It asks for permission and then crashes with the "Permission denied" problem.

      This problem is not a bug in the JPI. It's a result of the jar function's limitations. The unix 'tar' utility has a 'p' option to solve this problem.
      However, Extension-Installation is broken unless you can find a workaround or fix the problem somehow.

      The current bug filed against jar for this problem is 4097578. This bug specifically refers to directories, but bug 4071752 refers to files, and was closed as a duplicate of the directory bug. According to the evaluation, there's no way to preserve permissions using jar.

      Therefore, Extension-Installation can never work on Solaris, since it is running an executable extracted from a jar file. The only thing I can think of would be to force execute permission on the file from within the JPI before executing the installer.

            stanleyh Stanley Ho (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: