Solved

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

Posted on 2004-04-16
8
303 Views
Last Modified: 2013-11-18
     
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
0
Comment
Question by:jackiemani
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 10847549
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
 

Author Comment

by:jackiemani
ID: 10847562
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
 
LVL 14

Accepted Solution

by:
Tommy Braas earned 105 total points
ID: 10847894
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jackiemani
ID: 10848818
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
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 10849611
Before we get into code, did you also specify the cache_option and cache_version tags in your html file?
0
 

Author Comment

by:jackiemani
ID: 10851484
Yes i have. for each jar files
0
 

Author Comment

by:jackiemani
ID: 10851487
But it doesnt download to the JRE installed folder of the client.
0
 

Author Comment

by:jackiemani
ID: 10852534
<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

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question