views:

30

answers:

1

How do you run a java program that requires input from a file in Eclipse?

A: 

Not 100% sure if this is what you wanted. You may need to clarify your question more. You mean you pass in the name of the file through the commandline args?

You can add the file to the path by: Run Menu->Run Configurations...->Arguments Tab then under Program Arguments add the input filename.

Hope that helps!

Joel
Yup that's it! Thanks :D
Kat
You can also have it prompt for a file with a file selector dialog there.
Thilo