I have this following folder structure inside my ear
-proj1
- src
-loader.java
-proj2
- folder1
-1.json
-2.json
So I have to load these json files one by one in loader.java file to perform my operation. Project 1 has the reference of project2. I have deployed my ear in jboss6.3 eap server.
I have tried using the classloader to point to the directory, but the directory it gives is something else, but if I specify the file name directly to the loader it loads perfectly.
InputStream input = Thread.currentThread().getContextClassLoader().getResourceAsStream("folder1/1.json");
It loads correctly but I dont know to get the list of files in that folder directory