Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How to complie and run file.java and input.txt. to check the output?
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
snowball




PostPosted: Fri Jul 11, 2008 3:03 pm   Post subject: How to complie and run file.java and input.txt. to check the output?

Hi:
I'm new to java. How to complie and run file.java and input.txt. to check the output? I tried to complie file.java program...compilation completed..but got failed to run...got this comments from dr.java output : FileNotFoundException: input.txt (The system cannot find the file specified).
Anybody can help me work it out? Thanks a lot!
Sponsor
Sponsor
Sponsor
sponsor
silent1mezzo




PostPosted: Fri Jul 11, 2008 3:13 pm   Post subject: RE:How to complie and run file.java and input.txt. to check the output?

Well....That means that the program can't find the file Razz

If you're just trying to open the file (with no path extension). Put the text file in with the bin files and re-run your program.
Carey




PostPosted: Sat Jul 12, 2008 10:32 am   Post subject: RE:How to complie and run file.java and input.txt. to check the output?

to make a compiled program run there needs to be a method like so

Java:
public static void main (String[] args)


that is what is called when you run the program. With BlueJ anyway...
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: