0

I would like to create and work a signed applet from an applet that I wrote. The applet itself uses a library (owlapi) that has to have the correct write rights in order to save the changes made to the owl repository.

In order to do this I should use a .policy file or signed applets. To make signed applets I followed this manual. I follow that manual on the letter, and yet it doesn't work. I get to the point where I have a signed applet and include it in the html like this:

<applet  code="owlapi.LoadOntology.class" archive="owlapi/SignedLoadOntology.jar" height=100 width=1000 MAYSCRIPT>
<param NAME="archive" VALUE='owlapi/Signedowlapi-src.jar, owlapi/Signedowlapi-bin.jar'>
</applet>

When I am testing that applet with the appletviewer (which is recommended in that manual), I get the error

I thought I could solve that by manually compile the code with that library and then create a jar with all those .class files, but that didn't help:

javac -cp owlapi-src.jar:owlapic-bin.jar LoadOntology.java
jar cvf LoadOntology *.class

Does anybody know how to create such a signed applet that uses a some other jar-files?

*update: * after reading this thread, I found out that the owlapi-src and owlapi-bin jars had to be included to the applet in the html an should be signed too. I changed the code to my current testing code, but that still didn't work, since I now have again the

 java.lang.SecurityException: Unable to create temporary file

which means that the code from the used owlapi library isn't found.

Community
  • 1
  • 1
JasperTack
  • 4,337
  • 5
  • 27
  • 39
  • I doubt that you need to sign and include the -src jar, those usually contain the source code. – flup Apr 29 '13 at 16:23

1 Answers1

0

You probably need not include the -src jar, as I'd expect it to contain the java sources. I do think you need to provide both your own signed jar and the signed library jar in one and the same applet parameter, as follows:

<applet  code="owlapi.LoadOntology.class" height=100 width=1000 MAYSCRIPT>
    <param NAME="archive" 
        VALUE='owlapi/SignedLoadOntology.jar, owlapi/Signedowlapi-bin.jar'>
</applet>
flup
  • 26,937
  • 7
  • 52
  • 74