Results 21 to 27 of 27
- 05-31-2010, 08:28 PM #21
Member
- Join Date
- May 2010
- Posts
- 30
- Rep Power
- 0
-
Hm, how about this code, what does it return?
Java Code:import java.io.InputStream; public class T { public static void main(String[] args) { InputStream is = T.class.getResourceAsStream("T.class"); // *** changed *** System.out.println(is != null); } }
- 05-31-2010, 08:33 PM #23
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,406
- Blog Entries
- 7
- Rep Power
- 17
- 05-31-2010, 08:49 PM #24
Member
- Join Date
- May 2010
- Posts
- 30
- Rep Power
- 0
The result is true.
I was doing a mistake to consider "src" folder for the class file. Actually "src" is a folder that contains java files whereas class files are stored in some other folder(build/classes) in Eclipse.
Thanks to both of you (Fubarable, and Jos) for being so kind for regular help.
regards
-
So, has your problem been solved?
- 05-31-2010, 09:01 PM #26
Member
- Join Date
- May 2010
- Posts
- 30
- Rep Power
- 0
YES- It is solved.
regards
-
Similar Threads
-
Reg: File Reading Problem
By balaji csc in forum New To JavaReplies: 0Last Post: 11-06-2009, 04:22 PM -
[SOLVED] java.lang.NullPointerException when reading getClass().getResourceAsStream(.
By jon80 in forum New To JavaReplies: 2Last Post: 05-31-2009, 05:03 PM -
Weird path problem when reading properties file
By jerry_popperq in forum New To JavaReplies: 0Last Post: 03-18-2009, 03:32 PM -
Problem with reading text from a .txt file
By Gigi in forum New To JavaReplies: 40Last Post: 01-22-2009, 03:22 AM -
Problem reading an xml file with AJAX
By Fiona80 in forum XMLReplies: 0Last Post: 12-17-2007, 08:02 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks