java - I/O redirection in Eclipse? -
Is it possible to use I / O redirection in Eclipse?
I use the standard input / command line such as java MyProgram & lt; Input.txt & gt; Output at output.txt , but I do not think so to work in eclipse as part of the program logic & lt; Tried to include 's, which was ignored, and even in VM arguments, who threw a class that did not get the error. How can I do this?
In fact both redirect, the easiest way is still to define your program An external script
"Java% 1% 2% 3% 4 <% 5>"% 6 " (The number of parameters Customize your special program)
In the Run menu, click 'External tool ... Open external device dialog' and define external launch configuration in which you have both logic and etc. Specify the output ofput and output file.
This is not an ideal solution, as you can not debug your code (with "debug" launcher configuration) directly . Instead debug you have to remote (in your normal Java launcher script ' -Xdebug -Xrunjdwp: transport = dt_socket, server = y, suspend = n, address = 8000 Add')
once you have to launch your external device, "debug launcher 'to launch a remote debugging session through the Remote Java application' section:
Comments
Post a Comment