Embedding javaws app

Started by Exempt, May 30, 2015, 21:15:55

Previous topic - Next topic


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.


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.


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.


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).


I see, I don't really want to do anything all hackish like that. Maybe I'll just think of something else, thanks.