Hi Alessandro,
Couple of questions,
Which java version are you on? Did you check the error in the Java console? to enable console go to Control panel --> Java --> Advanced --> Java Console --> Show console
In MII Workbench, try creating a normal display template and test if it renders in the browser. If it does, then check Applet Error | SCN and have a look at Jeremy's reply. It could be a timing issue of your script.
Regards,
Tufale Ashai