Re: Javac settings

Svata Dedic <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.projects.devel
Organization CollabNet Hosting
Message-ID <[email protected]>
Jan Rojcek wrote:
> Hello team,
> 
> I am proposing the following javac customizer pane for use in Figures 2, 
> 49 and 53 (in the space for rent) of java project spec. The components 
> are in default state:
> 
> +------------------------------------------------- +
> | [ ] Enable JDK 1.4 Sources                       |
> | [x] Generate All Debugging Info                  |
> | [ ] Report No Warnings                           |
> | [ ] Report Usage of Deprecated Members           |
> |                                                  |
> |  Additional javac Options:                       |
> |  +--------------------------------------------+  |
> |  |                                            |  |
> |  +--------------------------------------------+  |
> +--------------------------------------------------+
> 

[snip]
> Note:
> "Optimize" is an option shown in the current (NB3.5) external compiler options. I haven't found such option listed between javac options. Was this option used with different external compilers?

Try "javac -?". The option for optimize is "-O".

Missing options:
-encoding
See "javac -?" output + documentation for more details.

-J-Xmx for the javac's virtual machine: if large project is compiled, 
the compiler may run out of memory with the standard heap size. This 
option is adopted by other IDEs in the GUI.

Possibly missing:
- way to generate NO debugging info at all (if you do not pass -g:none, 
the javac will assume -g:lines,source). Having to type such obscure 
syntax into the free-text area is clumsy, IMHO

Possibly overstrict:
"Enable JDK 1.4 Sources" -- this one appeared first time with JDK-1.4, 
but according to what is already known about the projected JDK-1.5, the 
language will change again. At that time, the checkbox should be 
replaced by a drop-down chooser of language flavours.
If the checkbox should remain there, then maybe we could make the name 
more "user-friendly": the only real thing it controls is whether the 
compiler accepts "assert" as keyword (defined in JDK 1.4). So maybe 
"Enable asserts".

Note: while "target platform" specifies tools, and libraries, "-target" 
switch specifically affects the version number of generated .class 
files, inner class translation etc. I am almost sure that the "target" 
option would be always set to the value of the selected target platform, 
but I would be glad if someone verifies the assumption.

-Svata
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.