Can I check out a file from a bank that contains 3 directories?

I have a jar file named "client.ts" (when viewed in ZipGenius) "/ com / something / messaging". When i do

JarFile jarFile = new JarFile("Client.jar");
JarEntry zipFile = jarFile.getJarEntry("client.ts");

      

It cannot find the client.ts file. If I package the file in "/ resources /" it can find it. Does JarFile.getEntry()

only one directory execute? The javadoc for getJarEntry()

just says: Returns ZipEntry

for the given name of the entry, or null if not found.

0


source to share


1 answer


The full JAR entry path should work:



JarEntry zipFile = jarFile.getJarEntry("com/something/messaging/client.ts");

      

+3


source







All Articles