aspose file tools*
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
Author

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

April Benzine
Greenhorn

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 {
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

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: 15299
    
    6

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: http://aspose.com/file-tools
 
subject: passing in a file from the command line----my main method