Is it possible to get a list of files in a directory inside a .jar ?
Let say that I have the following in a .jar:
/shaders/phong.cg
/shaders/bump.cg
To load a specific shader I do:
getClass().getResourceAsStream("/shaders/phong.cg");
But If I want to know the avilable resources in lets say "/shader/".
If I try get ClassLoader.getResources("shaders")
I just get the url to the different .jars containg a shader folder and not
a list of the files in the folder
If I do a System.getProperty( "java.class.path" ) I get jars assigned to the classpath.
In the best of worls my problmes would end here.... but the .jars assigned in
a webstart .jnlp file doesn't seem to be on the path.
In the .jnlp I do:
<resources>
<jar href="data.jar"/>
</resources>
How to solve the problem ?
// Tomas
