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.
I tried using a Scanner to scan a text file, but despite putting it right in the source folder, ti says it can't find the file. Am I doing something wrong or are beans not allowed to use Scanners?
It seems to only work with an absolute path but I can't give it one if I intend to make it a jar file.
I've placed copies of the file in all sorts of spots in the Nebeams project but it simply can't find it, despite being able to see it from the files window under the projects part in the src package part.
Right now I have it having the user ask for the directory, but that is a pain for the user. However, it will work if I do that.
You need to be a bit clearer. You're trying to read a file that's in a jar file? Is that the file it says it can't find? I assume the bean you mean is a JSF managed bean, and thus the connection to JSF, but I don't think you're issue is with JSF, so I'll move this over to our General Java forum.