title image

Smiley so ist es:
da kann ich dir dann ja doch noch helfen ;)



* Finds a resource with a given name. This method returns null if no

* resource with this name is found. The rules for searching resources

* associated with a given class are implemented by the * defining class

* loader of the class.


* This method delegates the call to its class loader, after making

* these changes to the resource name: if the resource name starts with

* "/", it is unchanged; otherwise, the package name is prepended to the !!!!!!

* resource name after converting "." to "/". If this object was loaded by

* the bootstrap loader, the call is delegated to

* ClassLoader.getSystemResource.


* @param name name of the desired resource

* @return a java.net.URL object.

* @see java.lang.ClassLoader

* @since JDK1.1


public java.net.URL getResource(String name) {

du musst "/a.txt" schreiben, ansonsten wird nach "packagename/a.txt" gesucht!
---------------------------- Hansa wird Meister Code-Anzeige wird schöner mit

geschrieben von




Beitrag anfügen