Should jce files be installed on the client machine?!?

     
Hi,
I'm writing a signed applet that makes use of JCE to decript some parameters.
The applet should work fine by just open it in a browser (that's the whole point in being an applet) and accepting the certificate that the applet contains.
In the applet html "archive" tag I added the JCE jars (sjce1_2_2.jar, local_policy.jar, sunjce_provider.jar, US_export_policy.jar) together with my applet jar .

Now, I can oly make the thing work if I add in my java plugin jre/lib/ext directory the JCE files.

Is this normal?!?
I mean to ask a client to install JCE and put the jar files in his plugin extension directory the JCE jars in order to be able to run my applet?

It doesn't make any sense!

Any ideas that I might use? Am I doing something wrong? Shouldn't JCE run fine with applets without installing anything on the client machines?

Thanx anyway
jackiemaniAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Tommy BraasConnect With a Mentor Commented:
You need to create a proxy applet, signed, which detects whether the necessary classes (jars) are available in the running JVM. If the needed classes are not available, the applet downloads the jars and installs them in a known location. Since the location is known, using a class loader would be trivial to retrieve the needed classes after the download(s) complete.
0
 
Tommy BraasCommented:
If you're using non-standard JDK APIs, you will have to supply the jars for those extension. I am not entirely sure, but you should be able to unjar the jars you're describing above and add the contents of them to your applet jar.
0
 
jackiemaniAuthor Commented:
Adding the contents only to the applet doesnt make it work.
These jars are optional package for JDK1.3.

How do i supply from sever automatically in case i need to supply it
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
jackiemaniAuthor Commented:
I COULD LOCATE THE JRE FOLDER AT CLIENT SIDE USING JAVA.HOME IN SECURITY CLASS.
BUT I AM NOT SURE HOW I WOULD DOWNLOAD AND COPY THE JARS INTO THE FOLDER.CAN U HELP ME WITH THE SAMPLE CODE FOR IT.IT WOULD BE GREAT HELP.

0
 
Tommy BraasCommented:
Before we get into code, did you also specify the cache_option and cache_version tags in your html file?
0
 
jackiemaniAuthor Commented:
Yes i have. for each jar files
0
 
jackiemaniAuthor Commented:
But it doesnt download to the JRE installed folder of the client.
0
 
jackiemaniAuthor Commented:
<PARAM NAME="cache_option" VALUE="Plugin">
<PARAM NAME="cache_archive" VALUE="a.jar,b.jar,c.jar">
<PARAM NAME="cache_version" VALUE="1.2.0.1, 2.1.1.2, 1.1.2.7">

sample above will it place my jar files to Jre folder of client  side inside jrepath/lib/ext/ folder ?


0
All Courses

From novice to tech pro — start learning today.