1

I'm having some problems with multiple applets contained in one jar, and the manifest file of the jar. Basically, I'm adding some manifest attributes to the jars manifest using ant:

<target name="-pre-init">

    <echo message="Updating Manifest"/>

    <manifest file="MANIFEST.MF" mode="update">
        <attribute name="Permissions" value="all-permissions" />           
        <attribute name="Codebase" value="*" />
        <attribute name="Application-Name" value="APP_NAME"/>
    </manifest>

</target>

After doing this, I do some obfuscation, and sign the jar. The manifest file inside this completed jar contains the following:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.2
Application-Name: APP_NAME
Class-Path: lib/plugin.jar
Permissions: all-permissions
Created-By: 1.7.0_45-b18 (Oracle Corporation)
Main-Class: 
Codebase: *

However, when I use the applets contained in the JAR on a web page, I get the following in the console:

Missing Application-Name: manifest attribute for: http://some_url/APP_NAME.jar
Missing Application-Name: manifest attribute for: http://some_url/APP_NAME.jar
Missing Application-Name: manifest attribute for: http://some_url/APP_NAME.jar
Missing Application-Name: manifest attribute for: http://some_url/APP_NAME.jar
Missing Application-Name: manifest attribute for: http://some_url/APP_NAME.jar
Missing Application-Name: manifest attribute for: http://some_url/APP_NAME.jar

Now, I'm not sure where to look, as I clearly see the Application-Name attribute in the manifest. The browser also complains about a missing permissions attribute, but again, I clearly see this attribute in the manifest file. Anyone have any insight as to what the problem may be?

SuperTron
  • 4,203
  • 6
  • 35
  • 62
  • I don't have enough of these pieces set up to test, but I think it's because your don't have a defined MainClass (making multiple applets with one jar impossible): http://stackoverflow.com/a/2591548/16959 – Jason Sperske Dec 26 '13 at 22:54
  • Of course this (less detailed) answer suggests that you can: http://stackoverflow.com/a/4254674/16959 – Jason Sperske Dec 26 '13 at 22:56
  • Well, the application works, I can use all the applets no problem, it's just the manifest attributes don't seem to apply to all of them... – SuperTron Dec 26 '13 at 22:59

0 Answers0