    

 ## On this page

  

 

 # getResource

 Last update: 16.07.2025 

public [getResource](get-resource.md)(name: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html)): [URL](https://docs.oracle.com/javase/8/docs/api/java/net/URL.html)

#### Return

A `URL` object for reading the resource, or `null` if the resource could not be found or the invoker doesn't have adequate privileges to get the resource.

#### Parameters

nameThe resource name