3

I have been trying to implement Java WebStart but the problem I'm having is that I need to get a directory from a jar file with no luck...

I need to read the following directory:

jar:http://localhost:8080/nadeploy/lib/NuevaAldeaFonts.jar!/net/perroazul/nafonts/res

When I instatiate it as:

new File(new URL("jar:http://...nafonts/res").toURI());

it throws IllegalArgumentException.

And if I try to open the jar file in order to read the directory as a jar entry with:

JarFile fj = new JarFile("http://localhost:8080/nadeploy/lib/NuevaAldeaFonts.jar");

It throws the following exception:

java.io.FileNotFoundException: http:\localhost:8080\nadeploy\lib\NuevaAldeaFonts.jar

Do I have any more options in order to read a directory from a jar obtained by Web Start?

Thanks in advance

Oso
  • 528
  • 4
  • 18
  • It looks like you're trying to open a URL. Do you need a File object? Or would an InputStream suffice? – Pace Jul 02 '10 at 16:54
  • No, I need to get the content of a directory, so that I can open the files contained in there by means of getResourceAsStream() – Oso Jul 02 '10 at 17:45

0 Answers0