Re: Redirecting Java input from file

Discussion in 'Java' started by Gordon Beaton, Aug 29, 2003.

  1. [ comp.lang.java removed ]

    On Fri, 29 Aug 2003 03:18:43 GMT, Erwin wrote:
    > Sorry to ask this beginner's question. I just started learning about
    > Java. If I have a file and intend to redirect the Java input from
    > file, is it possible to do that?
    >
    > java Name < file.dat


    Yes it will work. *All* programs that read from stdin will work this
    way, regardless of programming language.

    Why didn't you just try it?

    /gordon

    --
    [ do not email me copies of your followups ]
    g o r d o n + n e w s @ b a l d e r 1 3 . s e
     
    Gordon Beaton, Aug 29, 2003
    #1
    1. Advertising

  2. Gordon Beaton

    pikachu Guest

    Thanks Gordon. I just tried it, and it worked. I was confused with the shell
    script redirection < and relate it to Java input. Thanks anyway.

    "Gordon Beaton" <> wrote in message
    news:3f4f00e8$...
    > [ comp.lang.java removed ]
    >
    > On Fri, 29 Aug 2003 03:18:43 GMT, Erwin wrote:
    > > Sorry to ask this beginner's question. I just started learning about
    > > Java. If I have a file and intend to redirect the Java input from
    > > file, is it possible to do that?
    > >
    > > java Name < file.dat

    >
    > Yes it will work. *All* programs that read from stdin will work this
    > way, regardless of programming language.
    >
    > Why didn't you just try it?
    >
    > /gordon
    >
    > --
    > [ do not email me copies of your followups ]
    > g o r d o n + n e w s @ b a l d e r 1 3 . s e
     
    pikachu, Aug 29, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harald Hein

    Re: Redirecting Java input from file

    Harald Hein, Aug 29, 2003, in forum: Java
    Replies:
    2
    Views:
    380
    Harald Hein
    Aug 29, 2003
  2. Raymond DeCampo

    Re: Redirecting Java input from file

    Raymond DeCampo, Aug 30, 2003, in forum: Java
    Replies:
    0
    Views:
    1,489
    Raymond DeCampo
    Aug 30, 2003
  3. Gerrit Hulleman
    Replies:
    1
    Views:
    397
    John Harrison
    Apr 29, 2004
  4. Gaijinco
    Replies:
    1
    Views:
    291
    Phlip
    Feb 20, 2006
  5. Redirecting input from file

    , Jun 28, 2007, in forum: C Programming
    Replies:
    120
    Views:
    1,982
    Old Wolf
    Jul 15, 2007
Loading...

Share This Page