Play.classloader.getResourceAsStream(filepath);
filepath – relative to what? project root? playframework root? absolute path?
Or maybe the usage Play.classloader.getResourceAsStream is wrong?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the Play Framework the “conf” directory is on the classpath, so you can put your file there and open it with getResourceAsStream.
For example if you create a file “conf/foo.txt” you can open it using