• 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

How limit instances of an applet in a JVM

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
I have a senario in which I want the user to lauch only a single instance of my applet on a machine (JVM).Is there any way to prevent an applet being lauched more than once?
thanx in advance
 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Applets normally are run in a browser via the java plugin. Is that how yours is run?
Not sure how you would prevent the client/user from openning another browser window and loading another copy of the HTML page with the applet.

Is there a specific problem that you are trying to solve?
 
Ranch Hand
Posts: 473
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

This can be done by using cookies. The page will check for a specific cookie each time it is opened. If the cookie is found, divert it to some other message page otherwise let the page be opened on client.
This cookie is destroyed each time the page is closed.

Hope, this solves your problem!

Maki Jav
 
reply
    Bookmark Topic Watch Topic
  • New Topic