Java process problem in Eclipse
Posted
by Norbi
on Stack Overflow
See other posts from Stack Overflow
or by Norbi
Published on 2010-03-16T21:22:23Z
Indexed on
2010/03/16
21:41 UTC
Read the original article
Hit count: 203
Hi!
This is my code:
final String run_tool ="cmd.exe /C pelda.exe"; final Process tool_proc = null;
Runnable doRun = new Runnable() { public void run() { try { tool_proc = Runtime.getRuntime().exec(run_tool); } catch (IOException e) { e.printStackTrace(); } } };
Thread th = new Thread(doRun); th.start();
InputStream toolstr = tool_proc.getInputStream();
After the eclipse gives this warning message fot the tool_proc variable:
The final local variable tool_proc cannot be assigned, since it is defined in an enclosing type
I dont't know why my code doesn't work
please help me
© Stack Overflow or respective owner