Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Accesing a singleton class which reads propertyfile in another module

807591Apr 5 2008 — edited Apr 6 2008
hi , Here i have one question?

i read one propertyfile using class.getClassLoader().getResourceAsStream("PSTest.preoperties); in a class, that is singleton...and located module1(property file located in this module only)..

now i have to access that singleton class in Module2 and module 2 has module1.jar refering in classpath.

when i try to call singleton.getUsername(); now i'm getting java.lang.NullPointerException..

Please suggest me how to fix this...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 4 2008
Added on Apr 5 2008
15 comments
528 views