# Running swf files from Java



## channabasanna (Mar 3, 2010)

Hi All,

Is there any way that i can open a flash file from Java. We can open cmd, notepad.exe, mspaint and other executables present in the System32 folder.

Is there anyway i can open the swf file from Java.

Following code, is what i used to open the System32 executables.



> public class StartingFlash
> {
> public static void main(String[] args)
> {
> ...


This code opens the notepad and waits untill it is closed.
Sameway i tried giving the path of Iexplorer, and the swf file and i got the following Error.



> java.io.IOException: Cannot run program "E:\FLash\universe.swf": CreateProcess error=193, %1 is not a valid Win32 application
> at java.lang.ProcessBuilder.start(Unknown Source)
> at java.lang.Runtime.exec(Unknown Source)
> at java.lang.Runtime.exec(Unknown Source)
> ...


Waiting for your suggestions


----------

