I have 开发者_StackOverflow社区a file in my working project. It's in the current directory of source code.
Main
-> src
[packeges]
-> plugin
->MyLib.jar
-> other
I have a class in a packege of the src folder. Now I want to load the jar file to URL class like,
new URL("jar:file:/./plugin/MyLib.jar!/") // this relative file path is wrong
Could you please tell me what is the corrent relative path here?
I think that "." refers to the current directory of your binaries (*.class), not of your source code. Try create a url relative to your binaries.
精彩评论