Java Build Path

六月ゝ 毕业季﹏ 提交于 2019-12-06 04:45:53

Some suggested amendments / comments:

  • Remove the jar: prefix and the !/ suffix - these are note required and are probably confusing the matter
  • Can you verify the jar file exists:

    System.out.println(new File(new URL("file://test.jar")).exists());

  • Amend your class declaration to the following (get the File object to generate the URL for you, to avoid problems):

    URL[] classes = new URL[] { new File("test.jar").toURI().toURL() };

This worked for my test example, using commons-codec as the jar, and loading the Base64 class

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!