Here it is explained that I shall always use getClass().getResourceAsStream() so that I can read from jar, network. I shall not use getClass().getResource.toURI().toString(). So I guess, I shall not use getClass().getResource.getFile() or getClass().getResource.getPath() either for the same reason.
But what if I need to use File API (Apache Commons for example). I need to get a file from my resource folder (Eclipse) as File (or String, I can make new File(String)). What shall I do? Not use Apache Commons (say FileUtils.readlines(File), FileUtils.lineIterator(File) etc...)?
And how shall I access a file from my resources folder writing code for a web app (which will be on application server as *.WAR = jar)?
Is it right. that I cannot use File API (Apache Commons FileUtils.readlines(File), etc)? Or there is a trick?