JDK-4364782 : Extension-Installation fails because of limitations in jar utility
  • Type: Enhancement
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.3.0
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 2000-08-22
  • Updated: 2000-09-25
  • Resolved: 2000-09-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.3.1_01 fcsFixed
Related Reports
Relates :  
Relates :  
Description
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.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: firefly-fcs FIXED IN: firefly-fcs INTEGRATED IN: firefly-fcs
14-06-2004

SUGGESTED FIX After un-jarring the executable installer, give it execute permission (on Unix platforms).
11-06-2004

EVALUATION More study is needed to determine if the Java Plug-in can help with a workaround on the Unix platforms. Additionally, the installer may expect other files to be the same permission when first jarred up. In this case the plugin would not be able to help. I'm going to change this to an RFE instead of a dup of 4097578. Again, more study is needed. james.melvin@East 2000-08-25 I have spoken to the security team and they said it will be okay to change the permission of the downloaded file because permission has been granted to download the file in the first place. We will incorporated the workaround in the Firefly FCS. stanley.ho@Eng 2000-09-25
25-09-2000