Java 网络教程: JarURLConnection

原文链接 译者[陈志军]

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...

...

原创文章,转载请注明: 转载自并发编程网 – ifeve.com本文链接地址: Java 网络教程: JarURLConnection



white

white

Java at 1490520869@qq.com
扯什么扯,直接干。干完再说。
white

Latest posts by white (see all)

FavoriteLoading添加本文到我的收藏
  • Trackback are closed
  • Comments (0)
  1. No comments yet.

You must be logged in to post a comment.

return top