This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes passing in a file from the command line----my main method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

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

April Benzine

Joined: Sep 23, 2004
Posts: 17
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 {
AnalyzeFile af = new AnalyzeFile();
System.out.println("You need to enter the full path of the file" );


Hope this is enough info
Jeff Bosch
Ranch Hand

Joined: Jul 30, 2003
Posts: 805
That helps. What error are you seeing?

Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

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.

GenRocket - Experts at Building Test Data
I agree. Here's the link:
subject: passing in a file from the command line----my main method
It's not a secret anymore!