Another question about java's Runtime.exec
Its hard to explain but I'll take a crack at it. I have this java program that runs an executable. The executable works perfectly if I just run it from the command line. But if I use the java's Runtime.getRuntime().exec(cmd) command, it doesn't work correctly. Now I'll explain what works correctly exactly means. The executable works correctly, if its able to read the filename passed in by the command line arguments and read the data and process it. So when I use the command line explicitly, it works fine. It reads the filename and process the data and outputs it to the console. But when I use java to evoke it, the executable isn't able to read the file. Now I suspect the problem is that java redirects the output and the input stream or something of that nature, so the executable can only input and output to the standard console and not to file? That statement is probably wrong but its a guess. Well my question is( if you read this far thanks), that how would I be able to fix the problem so the executable would be able to read in from the file. Thanks for reading. Hoping desperately that someone can help me.