I have developed an application that basically searches its resources/runtime
directory, looking for .java
files.
Having fetched all .java
sources, it (together with program arguments) passes their absolute paths to JavaCompiler.
Of course, this approach doesn't work when application is deployed as a JAR package. So the question - how can I work with resource files as with regular files, i.e. pass their absolute path and read them afterwards?
I found some related topics here:
But what if I don't know names of the files? I seek solution that allows me to search the resources/runtime
directory. Moreover, I think making a copy of file somewhere and delete it later on is clumsy solution.
I use combination of Java and Scala (with sbt
build system), hence solution Java or Scala would be great.