In my eclipse, I have a Java project (let's name it project A). This project has a folder "dic", with some files in it, and I use this code to access those files:
File[] listOfFiles = new File("dic").listFiles();
for (int i = 0; i < listOfFiles.length; i++) { (...)
This works perfectly when executed in project A.
Now I need to use the classes in project A in an Android project (project B). I've included project A in project B's build path, and I get no compilation errors.
But when I try to execute the code above in an Android device, it seems to be checking the phone filesystem instead of the filesystem on project A, so it can't find the files.
How can I access the files in project A from project B? Is there a way to replace the code in project A so it can be used directly both in project A and B?