Computer Science Canada

How to complie and run file.java and input.txt. to check the output?

Author:  snowball [ 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!

Author:  silent1mezzo [ 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.

Author:  Carey [ 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...


: