Search code examples
javaplayframeworkgetproperty

Purpose and usage of "application.path" variable


In the Play! framework source for the main method in Server.java I found these two lines:

File root = new File(System.getProperty("application.path"));
if (System.getProperty("precompiled", "false").equals("true")) {
    Play.usePrecompiled = true;
}

Where can I find the application.path value?


Solution

  • System.getProperty("application.path") that looks like a -D property. So at the start of the server there is a call like java -Dapplication.path=/opt/play/myApp

    /play/framework/pym/play/application.py in line 251 makes the work.