JFlashPlayer and multithread support
843806Apr 23 2009 — edited Apr 23 2009I'm currently working on a image generation task which will be handled by a SWF file. Since the end result should be highly multithreaded in nature ,I cannot invoke a browser, So I'm using JFlashPlayer.All I need is to create a JFrame with an SWF embedded.The embedded SWF will do my job and once its done , It will notify the container(JFrame) to dispose itself.
This will work perfectly fine in a single threaded environment,But if I create more than 5 threads ,the application will crash throwing system out of memory errors from the Flash player.
I can allocate more memory to JVM but I didn't find any useful method which can set more virtual memory to the embedded flash object.Also if my understanding is correct, even if i create 5 different instances of of JFrame in 5 different threads,only one SWF object will be created in the memory, and all the JFrames shares the common SWF object.
Any suggestions guys ?
Thanks