Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"Trusted-Library: true", mixed code applet, getting lost and frustrated

980380Dec 17 2012 — edited Dec 18 2012
I've been trying to get a mixed code[1] applet to load until 7u10, without much luck. The frustration is stemming from the fact that I've found lots of reports of people asking the same questions as me, but with no examples of working setups, and no straightforward answers.

We've got an applet that makes use of some third-party JARs. Our previous developer had been unpacking the other JARs, and then re-jar'ing (is that a word?) all of them along with our own .class files, into one huge JAR. That file then got self-signed. The applet itself is loaded from a simple HTML page, all loaded from disk. No webserver, no JNLP, nothing like that.

This mostly worked but the re-jar'ing is a pain to maintain now that the previous developer has left. What I want to do instead is leave the third-party unsigned JARs alone and intact. So I compile our own applet code, jar it up along with a manifest containing Trusted-Library: true, and sign that JAR instead. Then we list all the JARs in the applet's HTML file. In theory, according to the link above, our signed applet should be able to use the unsigned code.

Instead, it throws a NoClassDefFoundError as soon as anything tries to instantiate one of the unsigned classes. The link above talks about properties and resource bundles, but we're not making use of any of those things (it's a really simple applet). It's the exact same complaint as found in this forum's threads here[2] and here[3], but the only answer given in those involved Class.forName and reflection... which made no sense in the context there, at least not to me.

This doesn't seem to be an unreasonable thing to want to do, but I can't find anybody talking about achieving it successfully.

edit: forum composer claims link insertion works, but it lies...
[1] http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/mixed_code.html
[2] 2280127
[3] 5205151

Edited by: 977377 on Dec 17, 2012 4:39 PM
This post has been answered by DrClap on Dec 17 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 15 2013
Added on Dec 17 2012
4 comments
1,039 views