This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
Hi all, I am a beginner on posting messages and also on JAVA so please excuse the conventions. I am having a problem reading a file .... PROGRAM: -------
ERROR: ------ mod.java:11: Class TextFileIn not found in type declaration. TextFileIn f = new TextFileIn("bigfile.txt"); ^ mod.java:11: Class TextFileIn not found in type declaration. TextFileIn f = new TextFileIn("bigfile.txt"); Thanks You'all [ February 14, 2002: Message edited by: Cindy Glass ]
If TextFileIn is a class defined by you make sure it can be found in one of the folders in your classpath. Also make sure your classpath includes "." (ie the current folder). If textFileIn is not in a package, put it in th3e same folder as your main class and then compile. If TextFileIn is in a package then you need to import it. You can also check out the following code:
Cool Looks like you are trying to use the TextFileIn class from the JavaRanch Common If that is the case, you need to ensure you include common.jar in your classpath and then import com.javaranch.common.TextFileIn; at the top of your class and it should work. [ February 14, 2002: Message edited by: Carl Trusiak ]