原文链接 译者[陈志军]
Java 网络教程: JarURLConnection
Java 中 JarURLConnection 类用来链接 Java 的 Jar 包文件。一旦连接成功,你就可以获取到 Jar 包里面文件的内容。
下面是一个简单的实例:
String urlString = "http://butterfly.jenkov.com/"
+ "container/download/"
+ "jenkov-butterfly-container-2.9.9-beta.jar";
URL jarUrl = new URL(urlString);
JarURLConnection connection = new JarURLConnection(jarUrl);
Manifest manifest = connection.getManifest();
JarFile jarFile = connection.getJarFile();
//do something with Jar file...
...
原创文章,作者:kepupublish,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/114001.html