• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to make an Applet that runs of both MSJVM and Sun JVM?

 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to make an Applet that runs of both MSJVM and Sun JVM?

I need to read a file from local system and I need to communicate with the Servlet.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly, you will need to restrict the code to the Java 1.1 API, because that is what the MS JVM implements.

Secondly, because an applet can't normally read from the local filesystem, it will need to be signed, or the local security policy altered. Signing is not an option here, because the MS and Sun JVMs accept different kinds of certificates which are not interoperable. Some starting points on how to change the security policy can be found here.
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Ulf Dittmer Thanks a lot!!

Originally posted by Ulf Dittmer:
Firstly, you will need to restrict the code to the Java 1.1 API, because that is what the MS JVM implements.


Yes, I have coded in JDK 1.1.6 only.

Originally posted by Ulf Dittmer:Signing is not an option here, because the MS and Sun JVMs accept different kinds of certificates which are not interoperable.


Since signing mechanism of Sun JVM and MSJVM are not interoperable, I can�t make a signed applet which will work with all browsers (since there having different JVMs). Am I Right?
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somewhere deep in the back of my mind I seem to remember that there was a way, if you deliver the applet both in a jar file (for the Sun JVM), and in a CAB file (for the MS JVM). Then you can sign each of the two files as the repective JVM requires, and reference them in an applet tag. MS invented an applet parameter with a special name ("cabbase" I think it was) where it would look first. So the tag would look like this:

There is a tool called cabarc which creates CAB files; you can find it here. I don't remember if it can sign applets as well, or how that was done with the MS JVM.
[ January 25, 2006: Message edited by: Ulf Dittmer ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic