channabasanna
In the zone
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.
Sameway i tried giving the path of Iexplorer, and the swf file and i got the following Error.
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.
This code opens the notepad and waits untill it is closed.public class StartingFlash
{
public static void main(String[] args)
{
try
{
Runtime runtime = Runtime.getRuntime();
//Process process = runtime.exec("E:\\FLash\\universe.swf");
System.out.println("Opening the Process");
Process process = runtime.exec("notepad.exe");
process.waitFor();
System.out.println(process.toString()+" is closed, its exit value is "+process.exitValue());
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
Sameway i tried giving the path of Iexplorer, and the swf file and i got the following Error.
Waiting for your suggestionsjava.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)
at java.lang.Runtime.exec(Unknown Source)
at demo.StartingFlash.main(StartingFlash.java:14)
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 5 more
Opening the Process