You can create the resources
folder in the conf
folder, put your file there and then create an InputStream
by calling
Play.classloader.getResourceAsStream("resources/file.csv");
Please note that you should not start the path with /
, because then the application will not be able to resolve the path and throw java.lang.ExceptionInInitializerError: null
at startup.
source share