The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


There is no red light to stop the program!!!

Posted by Kishori Sharan on December 11, 2000 at 5:11 PM

I think you are getting the file name from command line in

ConsoleReader input = new ConsoleReader(;
String edit = input.readLine(); //input is received here

then in line

String inputLine=in.readLine(); //this is my problem

you are trying to read the first line from the file "edit". So the program should not stop at this point, becuase "in" object reading from a file. I think the file name you are specifying doesn't contain any text so in is returning null and your inputLine is null. But, in no case your program will stop at this point. It must be stoping at first point where you are prompting user to enter file name as in
System.out.print("Please enter the file you wish to edit: ");



Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us