I've taken the well-known Netbeans tutorial "NetBeans File Template Module Tutorial" which shows how to create an HTML template, shareable via a module. It worked fine, but when I attempted to create a Java template using a java file instead of an html file for a template, I get unrecognized character errors. There must be a way to create a java source code template? Note: this is not a "Code Template" or a "Code Generator", which are similar features in NetBeans, but not the same.
Example template code, copied from the NetBeans default Java template:
<#if package?? && package != "">
package ${package};
</#if>
/**
*
* @author ${user}
*/
public class ${name} {
}