Playframework non-static method <T>form(java.lang.Class<T>) cannot be referenced from a static context Error with Form
<p>When I try to use below statement in my Playframework (2.5.4) applicaiton</p>

<pre><code>Form&lt;User&gt; userForm = FormFactory.form(User.class);
</code></pre>

<p>It is giving me below error when I compile 
non-static method form(java.lang.Class) cannot be referenced from a static context, I understand I am calling non static class FormFactory, but its how the play framework website suggests, please suggest.</p>