Currently I have created a basic java application in Eclipse and when I run it the IO occurs in the Eclipse integrated console window which is not quite convenient. I'd like to debug an eclipse application in a separate system console window (cmd.exe) which opens once I run the program and closes if I stop debugging or the program exits.
So what is the easiest way to achieve such a behavior?
I tried using a simple batch file (following this)
cmd.exe /c <Path to javaw> %*
then I saved this batch to the desktop and set the jre executable to this file (using full path) in Run Configurations
->Alternate JRE
->Java executable
->Alternate
. Yet when I run the program it says that specified executable does not exist for jre6. Do I have to put the batch file in the folder with jre6 binary files (java, javaw etc). The path is in the program files directory while I'm on a limited account.
Is there any other way?
Seems that I have found some kind of a solution. Not the best probably. So the batch now is
start /wait cmd.exe /c ""C:\Program Files\Java\jre6\bin\java" %*"
and in Eclipse settings I had to write a path relative to the JRE6/bin as follows:
../../../../Users/Name/Desktop/java.bat