Wednesday, April 28, 2010

Class vs. Classloader getResouceAsStream

In bk.sar -

For classloader.getResouceAsStream(), all names are absolute, no leading "/". For class.getResourceAsStream(), it has relative and absolute path. But relative means starting from the class's package, i.e., without the leading "/", it will search, not found and return null.

Then in BkWirelessMgr class, to load the sql,


Note that "/" is used here instead of File.Separator which doesn't work.

No comments: