That's too much code to work through all of it, but keep in mind that the code in the main method is executed only if it is run from the command line. So if the "in" and "out" streams are not initialized anywhere else, they will be null if the code is not run from the command line.
Joined: Jun 08, 2008
Thank you for your reply. Where should the "in" and "out" be initialzed and to what, so that they will be null if the code is not run from the command line but from GUI.
Joined: Mar 22, 2005
Either initialize everything directly in the constructor, or move it into an "init()" method that's called after the constructor is done.