Hi,
I'm very new to java... and I'm having a problem in getting a URL
This code works well when I supply a filename "abc.jpg" directly instead of name. But if I get the filename in "name" string.. then, the returned url value is null.
is there any difference in sending the argument to getResource() in these two different ways.
Thanks
I'm very new to java... and I'm having a problem in getting a URL
Code:
URL url; url=getClass().getClassLoader().getResource(name); System.out.println(url);
is there any difference in sending the argument to getResource() in these two different ways.
Thanks
Comment