Hi developers,
I have a code like this: try {
System.out.println("Creating process..");
Process p = Runtime.getRuntime().exec("C:\\Windows\\System32\\ notepad.exe");
InputStream in = p.getInputStream();
for (int i=0;i<in.available();i++)
{
System.out.println("df"+in.read());
}
Thread.sleep(10000);
p.destroy();
}catch (Exception ex)
{
ex.printStackTrace();
}
My purpose is to execute a .exe file in a jpanel.
I have a jpanel and is there any feasible way to add .exe into the jpanel?
Pls advise, thank you!