• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Applet non-JDK packages import

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, friends!

I've got an applet that uses some packages that are not included in the standart JDK, I presume they're loaded through the plug-in that loads the applet. Anyway, what about some other packages... for instance org.apache.commons.httpclient and com.oreilly.servlet packages? How am I supposed to include them in the JAR that needs to be signed. I guess it's not by including the source within, there must be some other way. Would you assist me on that issue, please?

Thanks in advance! Best regards,

Martin Asenov
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's no problem to use other libraries in an applet - that's what the "archive" attribute of the applet tag is for. If the applet is signed, then all other jar files need to be signed as well; it works the same way.
 
Martin Asenov
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Ulf, I gave it a try... Everything's fine, the applet gets loaded, but... when it comes to using the HttpClient package from apache i get a ClassDefNotFoundError in the java console. But I've got the 'commons-httpclient-3.1.jar' in /WebContent and it is signed, and it does contain the class that 'could not be found'.

And that's my applet tag:



Please, help...
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are the other jar files being accessed and found correctly? Can you see (in the web server access logs) the request for the jar file coming it? If so, is the URL correct, and does the server respond with a 200 response code? Can you download the jar file manually through the browser?
 
Martin Asenov
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, Ulf, I fixed that. Anyway, if my applet is signed with certain keystore, and the relative jars that the applet uses are signed with another keystore, is the applet supposed to run?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I doubt that you can use different keys, but that's easy enough to test.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic