Re: Javac settings

Jan Rojcek <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.projects.devel
Message-ID <[email protected]>
Hi Svata,

thank you for your feedback. Inline...

Svata Dedic wrote:
> 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".
> 

I found it but not in JDK1.4.1. Was it removed? It isn't documented in 
manual pages of javac, either.

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

I would leave the encoding option for the additional options text field. 
Do you find it an important option?

> -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.
> 

Fine, this should be exposed 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
> 

I think usage of no debugging info is rare. OTOH, the name "Generate All 
Debugging Info" doesn't say what info is generated when unchecked. So 
probably a checkbox "Generate Debugging Info:" with combobox containing 
two choices: "Sources, Lines, Vars", "Sources, Lines" would be better.

> 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".
> 

I am for keeping the specific checkbox for 1.4, and renaming it.

> 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.
> 

I hope this can be left for the free-options area.

So, the javac customizer would look like this:

+---------------------------------------------------------+
|                                                         |
| [ ] Enable Asserts           +--------------------+---+ |
| [x] Generate Debugging Info: |Sources, Lines, Vars| v | |
| [x] Report Warnings          +--------------------+---+ |
| [ ] Report Deprecations                                 |
|                                                         |
|                              +------------------+       |
|  Maximum Heap Size (MBytes): |                  |       |
|                              +------------------+       |
|                                                         |
|  Additional Javac Options:                              |
|  +----------------------------------------------------+ |
|  |                                                    | |
|  +----------------------------------------------------+ |
+---------------------------------------------------------+

Would that work?

Thank you,
Jano
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.