This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
a smoke Welcome to the Java Ranch, we hope you�ll enjoy visiting as a regular however, your name is not in keeping with our naming policy here at the ranch. Please change your display name to an appropriate name as shown in the policy. Thanks again and we hope to see you around the ranch!!
Rene Larsen wrote: [I][/I] Note that this will throw a NullPointerException (because "path" is null) if the class was loaded from a jar. It probably won't make much sense if the class was loaded over the network. In general, expecting getResource() to only refer to real files on the local filesystem is a dangerous asumption.