Re:Some java help needed!

<[email protected]>
Newsgroups gmane.comp.java.enhydra.barracuda.general
Message-ID <[email protected]>
Thanks, Diez.

After looking at the javadocs, I did the following:

Object obj = new Object();
try{
BufferedReader in =
new BufferedReader(new
FileReader
(obj.getClass().getClassLoader().getResourceAsStream("countries.txt")));
.....
....
}
What is wrong here? I get the following error message: 

cannot resolve symbol
    [javac] symbol  : constructor FileReader (java.io.InputStream)
    [javac] location: class java.io.FileReader
    [javac] new BufferedReader(new
    [javac]                    ^
    [javac] 1 error

I have imported java.io.*.

Thanks,

Damar



>Hi,
>
>use <SomeClass>.getClassLoader().getResourceAsStream("countries.txt")
>and move it to <webapp>/WEB-INF/classes.
>
>Diez

>> If I want to avoid the absolute directory, for the convenience of
>> deployment in Tomcat, in which directory, should I place the
>> countries.txt file?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.