I need my application to be able to get the full path information for a jar file within the MyEclipse Project.
I have imported the jar (my.jar) as an External Jar file on the Project>Properties>Java Build Path
URL aURL = this.getClass().getClassLoader().getResource(“my.jar”);
Yet has returned “null” every single time when I’ve run a Junit Test case to validate this.
Do you need to do something special for MyEclipse to use the ClassLoader.getResource method to read get URL paths to jar files?