• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How limit instances of an applet in a JVM

 
Muhammad Sarwar
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • 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
 
Norm Radder
Bartender
Posts: 1526
14
  • Mark post as helpful
  • send pies
  • 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?
 
Maki Jav
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic