• 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

detect JVM

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a web application, in which an applet is included. If the user does not have JVM, I want to redirect them to SUN website to download it. The question is: how can I detect the JVM on the client's machine? I found a lot of examples using applet, but I do not think they can work in my application, because the purpose for me to detect the JVM is to run the applet. Help please? Thanks!
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to use the OBJECT tag. An example might look like:



Read this for more details.
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Gregg! That is very helpful. One more question: after downloading the JRE, the JSP page complains that the applet which has been working on those clients with JRE is not initialized. Anything special needs to be included in the init () method? Thanks a lot!
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It think there must be some error ocurring during normal execution of your java code. Take a look in the console (in internet explorer go to tools menu -> sun java console) to see if there's any Exceptions being reported.
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks! I finally figured out what the problem is. There was a "name" declared when I was using the "applet" tag, and left it out when I changed it to "object" tag. So when my applet is referenced by this name, it is null. Thanks guys!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic