What we do :
We run Play2 application on Cloudbees and we load a file from '/conf' directory (inside the classpath of the application).
These 2 snippets work in local and at heroku
Play.application().getFile("conf/myfile.json")
and
new File("conf/myfile.json")
However, on Cloudbees, we get FileNotFoundException :
java.io.FileNotFoundException: /var/genapp/apps/..../conf/myfile.json (No such file or directory)
So how to load a file from classpath on Cloudbees?