I have a class file say, abc.class which got compiled from abc.java While trying to execute this java program, I am not getting the output in my console. I have executed this file in linux environment. the file contains one of the line which draws importance :
Runtime rt = Runtime.getRuntime();
String a = "ls";
Process proc = null;
try {
proc = rt.exec(a);
}
Note : While executing the program, the prompt is not there and i think that might be the reason for 'ls' not getting executed through my program. I am not getting any error though. I am concern that as soon as the file get execute I will get the list of file in the prompt. Hope i make to clear you all guys about my issue. Please can I have any input on this issue of mine. your valuable