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.
|Summary:||Allow setting more javac options in j2seproject's|
|Component:||Project||Assignee:||Tomas Zezula <tzezula>|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
|Bug Depends on:|
|Bug Blocks:||41537, 47806|
Description afreije 2004-08-08 15:06:26 UTC
With a J2SE project, there's no way to specify extra javac options. Especially setting -Xlint:unchecked should be possible, but probably other options should be made possible as well. The tab Project Properties/Build/Compiling Sources seems to be the proper location for setting these options, since the -g and -deprecation are controlled there as well. If not to be controlled by the UI, then at least manual modifications to project.properties should be supported, e.g. with the javac.options property
Comment 1 Jesse Glick 2004-08-09 16:16:34 UTC
Desirable though not clear if it will be straightforward with Ant to add arbitrary options from a single property (or set of properties). Probably <compilerarg line="..."/> will work. In the meantime, can override -init-macrodef-javac in build.xml to the same effect. See also #43395 for -Xlint:unchecked specifically.
Comment 2 afreije 2004-08-09 19:33:43 UTC
The tip from #43395 works like a charm. Though I would not recommend to let a new netBeans user to poke around in build.xml, it would require knowledge of both XML and Ant. Although generics are somewhat more advanced language features, any programmer that uses the java.util from JDK 1.5 will run into the Note sooner or later. A generics newbee should see the warnings, an advanced programmer can turn them off and will settle for the Note.
Comment 3 Jesse Glick 2004-08-09 23:23:30 UTC
Yes, generally agreed. I think too late to change for 4.0 due to feature freeze but will try to do it for 4.1, along with a general expansion of the things that are configurable in the GUI for j2seproject's.
Comment 4 Jesse Glick 2004-08-24 15:30:41 UTC
*** Issue 43395 has been marked as a duplicate of this issue. ***
Comment 5 David Konecny 2004-08-25 14:05:57 UTC
I added new property "javac.compilerarg" which can hold these optional arguments. Empty property with description comment is generated to project.properties. You do not have to override the target in build-impl.xml anymore and can instead just set this property. Changed files: src/org/netbeans/modules/java/j2seproject/Bundle.properties; new revision: 1.15; previous revision: 1.14 src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java; new revision: 1.26; previous revision: 1.25 src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl; new revision: 1.32; previous revision: 1.31
Comment 6 David Konecny 2004-08-25 16:42:00 UTC
Sorry, one more change: I renamed "javac.compilerarg" to "javac.compilerargs" to make it consistent with other properties.
Comment 7 Jesse Glick 2004-08-25 19:28:54 UTC
*** Issue 47904 has been marked as a duplicate of this issue. ***
Comment 8 Tomas Zezula 2004-08-26 22:09:31 UTC
Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties,v <-- Bundle.properties new revision: 1.33; previous revision: 1.32 done Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerCompile.form; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerCompile.form,v <-- CustomizerCompile.form new revision: 1.8; previous revision: 1.7 done Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerCompile.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerCompile.java,v <-- CustomizerCompile.java new revision: 1.11; previous revision: 1.10 done Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectProperties.java,v <-- J2SEProjectProperties.java new revision: 1.24; previous revision: 1.23 done
Comment 9 Tomas Zezula 2004-08-26 22:19:55 UTC
*** Issue 46284 has been marked as a duplicate of this issue. ***
Comment 10 David Konecny 2004-08-30 10:45:56 UTC
*** Issue 48127 has been marked as a duplicate of this issue. ***
Comment 11 Jesse Glick 2004-08-30 22:39:25 UTC
*** Issue 48176 has been marked as a duplicate of this issue. ***
Comment 12 Milan Kubec 2004-09-01 10:37:24 UTC
Verified in custom 20040901.