Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

passing in a file from the command line----my main method

 
April Benzine
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sorry, my main method is in another class called ProjectOneDriver. Here's the code for that:

public class ProjectOneDriver
{
/**
* The main program for the ProjectOneDriver class
*
*@param args The command line arguments
*@exception IOException Description of the Exception
*/
public static void main(String[] args) throws IOException {
if(args.length==2){
AnalyzeFile af = new AnalyzeFile();
af.runApp(args);
}
else{
System.out.println("You need to enter the full path of the file" );
}
}

}

Hope this is enough info
 
Jeff Bosch
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
  • Report post to moderator
That helps. What error are you seeing?
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Creating multiple posts on the same topic just makes it harder for us to help you. Let's keep all dicussion in this thread. Closing this one.
 
    Bookmark Topic Watch Topic
  • New Topic