一個簡單的例子
public class JarReader {
public static void main(String[] args) {
String jarPath =
String entryFile =
doRead(jarPath
}
public static void doRead(String jarPath
try {
JarFile jarFile = new JarFile(jarPath)
JarEntry entry = jarFile
InputStream input = jarFile
process(input)
jarFile
} catch (IOException e) {
e
}
}
private static void process(InputStream input) {
Properties p = new Properties()
try {
p
Set<?> set = p
for (Object name : set)
System
} catch (IOException e) {
e
}
}
}
這個比較簡單
From:http://tw.wingwit.com/Article/program/Java/hx/201311/25966.html