console redirection [message #124612] |
Mon, 08 September 2003 19:02  |
Eclipse User |
|
|
|
Is there a way I can do console redirection when I run my Java class
files within Eclipse. For example, I want to use a file called
input.txt as my standard input, but typing "< input.txt" in the program
arguments section of my java application configuration doesn't seem to work.
Thanks,
-mike
|
|
|
|
|
Re: console redirection [message #125933 is a reply to message #125896] |
Tue, 09 September 2003 13:57  |
Eclipse User |
|
|
|
"CL [dnoyeB] Gilbert" <ThisisFake@Fakeness.xyz> wrote in message
news:pan.2003.09.09.17.48.21.878997@Fakeness.xyz...
> On Tue, 09 Sep 2003 11:56:26 -0400, Eric Rizzo wrote:
>
> > Michael Donikian wrote:
> >
> >> Is there a way I can do console redirection when I run my Java class
> >> files within Eclipse. For example, I want to use a file called
> >> input.txt as my standard input, but typing "< input.txt" in the program
> >> arguments section of my java application configuration doesn't seem to
> >> work.
> >
> > That's because that is operating system/command shell functionality, not
> > Java functionality.
> >
> > I would recommend re-writing the app to accept the name of an input file
> > as an (optional?) parameter. Or write a wrapper that reads the input
> > file and feeds the underlying app that expects System.in input.
> >
> > HTH,
> > Eric
>
>
> i am sure its easier than that. In netbeans their was a launching
> context, and you could put your command line options there. Their is
> likely a command like option somewhere in Eclipse that launches the
> 'javaw' command. I dont know where though...
To use java instead of javaw:
See the JRE Tab for your launch configuration.
Specify to launch in an Alternate JRE and then you are able to specify the
Java executable that will be used.
Darins
|
|
|
Powered by
FUDForum. Page generated in 0.08090 seconds