Hello Guest

Embedding javaws app

  • 4 Replies
  • 2982 Views
Embedding javaws app
« on: May 30, 2015, 21:15:55 »
I'm not sure if embedding is the right term for this or not. My goal is to embed a Javaws application into my own java app. The javaws app would run inside the same window as my own app which is just a statistics gathering app with a simple gui.

*

Kai

Re: Embedding javaws app
« Reply #1 on: May 31, 2015, 10:53:37 »
I totally fail to see what this has to do with LWJGL (or general Java game development)...  ???

But to answer your question, this is not possible for the same reason that you cannot have Crysis run in your Java Swing JPanel.
Those are two different operating system processes using completely separate window system components.
While being two separate processes they also do not share the same virtual memory space and cannot communicate in any way with each other, unless specifically designed to do so.

The only way to do what you want is to have your Java application link against the JAR files of the Web Start application and invoke it programmatically. But for that to succeed, the Web Start application would very very likely need to be redesigned for such a usecase, in order for it to provide some sort of API for including its own window components into another application.
« Last Edit: May 31, 2015, 11:11:44 by Kai »

Re: Embedding javaws app
« Reply #2 on: May 31, 2015, 15:41:00 »
I already have the statistics gathering part done I'm just wanting to make it into a nicer gui with the javaws app in the same window. Surely there is some way to do this... hm.

*

Offline Cornix

  • *****
  • 488
Re: Embedding javaws app
« Reply #3 on: May 31, 2015, 15:47:49 »
Is the webstart (ws) app written by you or a third party? If you have full control over the ws app's source code then of course it should be simple to do what you want.
Otherwise you can use byte-code injection to change the code of the ws application when it is started; this way you can change how it is embedded into a JFrame. But this is fairly complicated and ugly (coding wise ugly I mean).

Re: Embedding javaws app
« Reply #4 on: May 31, 2015, 18:34:56 »
I see, I don't really want to do anything all hackish like that. Maybe I'll just think of something else, thanks.