Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 808
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
That helps. What error are you seeing?
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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