Incorrect URLs won't throw a NullPointerException but a MalformedURLException. Are you sure that's the line that's causing the problem?
As for using URLs to the local file system, use new File(...).toURI().toURL().
Kaustubh Bholee wrote:Please help me on it asap.
Please
EaseUp.