• 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 tag in Firefox - Finding the preferred JRE

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all... My applet is embedded using the Object tag, in which the 'classid' attribute allows the applet to choose a preferred JRE version to run.

Now, I need to make the applet compatible with Firefox. For this, I am trying to do away with 'Object' tag and use the 'Applet' tag. So far, so good and the applet loads with Firefox. The only hitch is, I dont find any equivalent for classid attribute and I am about to sacrifice JRE choosing feature. Can someone give me ideas on how I can accomplish this with the 'Applet' tag.. Thanks in advance.

Here is my code that works with IE and Firefox,

 
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the purpose of a "JRE choosing feature"? The browser will use the JVM that the user selected for running applets anyway; what else are you looking for?
 
Sugantha Jeevankumar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By JRE choosing I mean, if more than one version of JRE is installed, a particular version should be chosen and run. For instance, in my case, my machine has both 1.5 and 1.6 JREs installed, but my applet works best with JRE 1.5. Since an applet would choose the latest JRE out of all installed JREs, the classid tag jumps in and loads the applet using 1.5 JRE. The below link explains this,

http://download.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/using_tags.html#object
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the deployJava script allows you to do this: http://download.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html
 
Sugantha Jeevankumar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many thanks.. That sounds like exactly what I was looking for. I am checking it out. I will let you know how it goes.
 
Sugantha Jeevankumar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried the following code,



It works fine with both IE and Firefox when only JRE 1.5.0_22 is installed. When I installed both JRE 1.5.0_22 and 1.6.0_20, I expected the 'version' argument to kick in and load the applet in JRE 1.5, instead I got the following message in my java console,


java.lang.ClassNotFoundException: ButtonMoveApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: ButtonMoveApplet.class



I tried clearing the local JVM cache and tried the same in different combinations of JRE 1.5 and 1.6, still the same problem. Does anybody know why.. Thanks in advance.
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic