But this code works only in Linux when I extract the jar file into the eclipse plugin directory. The same code fails to work on a Windows system giving the Null Pointer Exception for the file. The file is definitely present in the eclipse plugin directory for Windows as well.
No Nitin. I need it to be a file (for that matter a resource to be added with the plugin) and not a URL. Currently extracting the jar in the plugin directory is working in Linux, but the same code fails in Windows.