Perry Smith

Java Questions & Answers

Home / Java Q & A Archive Page 3 / Java Q & A Archive

Java I/O Problem
Monday, 01-Feb-99 06:46:00

195.232.49.249 writes:

Hello there,

is there anybody who can help me with the following problem ?

I need to write a String from the command prompt into a file.

      Example: java PrintString hello
      - a specific file should now contain the
      String "hello"
Thank you in advance

Mike


Response
Re: Java I/O Problem
Monday, 01-Feb-99 12:13:35

148.5.110.71 writes:

Mike, Command line aguments are passed to a Java app. as they are in C, public static void main(String args[]), except that args[0] is the first argument. You can then write args[0] out to the disired file. If you need help with that as well let me know.

Scott_M2


Home / Java Q & A Archive Page 3 / Java Q & A Archive