Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Applet using multiple self-signed JARs

 
Greenhorn
Posts: 25
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm working on an Applet which is not in a JAR. With the security issues/requirements with the latest versions of JRE, we now need to JAR the applet (and sign it). And when we did, we realized that our JAR file reached 30mb in file size! (.java files already excluded). (We do have lots of transactions with this applet)

Now we're exploring if it is possible to make this applet use separate signed jar files, which would be downloaded only as the user access the corresponding transactions. We've tried it but we've only managed to download the signed jar file which contained the applet but when we access the transactions, the JAR file wasn't downloaded. =/

I've read oracle articles about JRE / JAR signing but they didn't mention anything about applet using multiple JARs.

Need some advice / guidance on what could we do next to make this work.

Thank you very much.
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What html are you using to deploy the applet?
Have you listed all the required jars in the archive attribute?
 
Marcelino Parado
Greenhorn
Posts: 25
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Here's block of html code for my applet:



...

I'm trying not put the other JAR files in the archive attribute to make the initial access of the applet faster. I want the other JAR files to be downloaded only as the user access the corresponding transactions.

For example:
"JAR A" will only be downloaded as "user A" accessed "Transaction A". (Assuming "JAR A" contains the classes corresponding to "Transaction A".)

I was able to make this approach work in lower versions of JRE (1.7 update 21 or lower).

Still a bit confused on what could be the next step for me. =/

Thank you.
 
Tony Docherty
Bartender
Posts: 3323
86
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this oracle document which suggests that indexing the jars will ensure only the required jars are downloaded.
 
Marcelino Parado
Greenhorn
Posts: 25
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tony. I'll try this "indexing". Give you feedback on this. Thank you very much.
 
Tony Docherty
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My pleasure, yes please do let us know if it works as it may well help other people in the future.
 
Marcelino Parado
Greenhorn
Posts: 25
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for the late post. Just want to give you an update:

JAR indexing solved my problem.

I've added in my manifest file a declaration similar with the following:
Class-Path: Group1.jar Group2.jar

and
execute the jar indexing command:

JAR I MyMainJAR.jar

...

Group1.jar and Group2.jar are now only downloaded as the user accessed/used the corresponding transactions/classes that are included in those JAR files.

Thank you very much Tony for your input.


 
Tony Docherty
Bartender
Posts: 3323
86
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Really pleased to hear it has solved your problem and thanks for updating the thread.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic