• 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

Getting access to already running Java Web Start application

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everybody,


I am developing an large application which has to operate in the Web and Desktop environment.
My current use case in this application will be that user will navigate for items in the Web based application and as soon as the item will be found there will be a link on the page which will start simple (small) Java Web Start application with parameter pointing to the founded item number. This small Web Start application should have access to local resources and other application started on the same machine.

My question is:
Could I get access to already running Web Start application (JVM) over JNLP link? I mean that user click on the first item on the web page and JWS application is started. Then user is clicking on the next item on page and the same already started application should get the new parameter to work on. I would like to avoid of starting second JVM and simple get access to already started instance of application.

Thanks in advance for any information, suggestion and help.

Best regards

Ɓukasz
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's nothing like this in the JNLP spec. So, basically you're asking how you can only run one instance of an application on a system. The usual way to do this is for the application to open a ServerSocket on a predetermined port. Then if you try to run a second copy, it won't be able to open that ServerSocket because the first copy has it open already. At this point the second copy should just terminate.

If there are parameters involved, the second copy could then send them to the first copy by sending a message over the predetermined port before it terminates.. The application would have to be coded to accept parameters in this way.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic