Ishikawa91 Ishikawa91 - 11 days ago 6
Java Question

Missing permissions attribute in main jar (but it exists in the jar)

Background


  • main.jar <-- main codebase

  • util.jar

  • HTML Code:

    <applet id="app"
    archive="main.jar,util.jar"
    code="com/business/app/App.class"
    mayscript="true">
    ... params ...
    </applet>



Error

"Missing required Permissions manifest attribute in main jar
http://localhost/main.jar
"


What I have done

I signed both jar files with our certificate and running the following is fine.

jarsigner -verify main.jar
jarsigner -verify util.jar


Also, I included the manifest BEFORE signing the jar files.

In main.jar I have the MANIFEST.MF file:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Codebase: *
Permissions: all-permissions
Application-Library-Allowable-Codebase: *
Caller-Allowable-Codebase: *
Application-Name: AppName
Created-By: 1.7.0_45-b18 (Oracle Corporation)


I have already taken a look at the following question to no avail



Question

I already have the manifest, and it contains the correct permission. Does the order matter in the manifest, and/or are there any other dependencies or causes for the missing permissions manifest error?

TLDR

I am getting a missing required Permissions manifest attribute error in my main jar file even though I have included it. What other dependencies exist for the permissions attribute, if any?

Answer

I was able to resolve this. It was a silly issue. The MANIFEST.MF file goes under the META-INF directory.

Comments