This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have previously been able to use NetBeans without any issues. Now today, when I create a new project, what I am getting by default is the following: <#assign licenseFirst = "/*"> <#assign licensePrefix = " * "> <#assign licenseLast = " */"> <#include "../Licenses/license-${project.license}.txt"> <#if package?? && package != ""> package ${package}; </#if> /** * * @author ${user} */ public class ${name} { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here } } This is what I used to get: /* * HelloWorldApp.java * * Created on February 15, 2008 * * To change this template, choose Tools | Templates * and open the template in the editor. */ package helloworldapp; /** * The HelloWorldApp class implements an application that * simply prints "Hello World!" to standard output. */ public class HelloWorldApp { /** Creates a new instance of HelloWorldApp */ public HelloWorldApp() { } /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here } } Any help would be appreciated.
Seems as a freemarker problem, but I am not able to find out the right component. Jarda will know.
Give me list of modules that you have enabled - e.g. attach messages.log from your directory. Then reopen the bug.
Created attachment 57580 [details] Messages Log file
I have attached the messages.log file and reopened the issue as requested.
As I understand you concern about absence of constructor in your generated class. But you was able to get generated code with constructor before ? Is it just 6.0 version problem ? I cannot compare current behavior in 6.0 and 6.1 ( they are the same ) with previous versions because I don't have previous NB versions. So possibly the issue is just in template file. Could you please confirm or disclaim that you care only about default Java file template. You can put additional lines below inside body of class of your template. public ${name}{ } In this case you will get what you want. So the essence of this issue is just about default template for Java main class ( and possibly about Java class ). Is it correct ?
Yes, I was able to get generated code with the constructor before. As per my original post. I don't have any other versions of NetBeans, only 6.0. I have fixed this problem. My computer is set to automatically get Java Updates. What I did was uninstalled the most recent update. Now I get the proper values for the variables $(name), $(user), and $(package).
I'm sorry . I still don't understand you . You wrote : > Now I get the proper values for the variables $(name), $(user), and $(package). So you got wrong values before for this properties ? ( I don't see such behavior in your original description of issue ). You said that now all works fine. Could you please provide content of template files of Java Main class that you have currently ? Thanks.
You wrote: >So you got wrong values before for this properties ? >( I don't see such behavior in your original description of issue ). If you look in my original post, the first cut and paste was the values I was getting when creating a new java application. You will see that this was what I was getting: <#assign licenseFirst = "/*"> <#assign licensePrefix = " * "> <#assign licenseLast = " */"> <#include "../Licenses/license-${project.license}.txt"> <#if package?? && package != ""> package ${package}; </#if> /** * * @author ${user} */ public class ${name} { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here } } Obviously this was fustrating as I had to delete the fist 4 lines, and change the $(user) to my name, $(name) to the name of the java application, and $(package) to the name of the package I was creating. You wrote: > Could you please provide content of template files of Java Main class that you have currently ? Here is what I get when I create a new Java Application Now: /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package javaapplication35; /** * * @author bwright */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here } }