[java] Get a resource using getResource()