I have deployed on war under WildFly-9.0.2 and in java code I want to get absolute path for one of the jar which is available under helloworld.war/WEB-INF/lib/
directory, I am trying with following java code
Thread.currentThread().getContextClassLoader().getResource("WEB-INF/lib/demo.jar/")
This was working in JBoss 4.0.5, but in WildFly 9 it gives null,
If I try with following code
Thread.currentThread().getContextClassLoader().getResources("")
Then I can see the file as follow, but for this I have to iterate through all the return collections,
vfs:/C:/Users/alpesh/Desktop/content/helloworld.war/WEB-INF/lib/demo.jar/
So, how can I directly locate the jar path as I was doing on earlier JBoss.