Maybe that was a bad example.  To be honest, I don’t really know.  The more I 
try to migrate from JDK 8 to JDK 11 the more baffled I am.  I know there were 
some modules in JDK9 and 10 that were some weird SE/EE thing like JAXB for 
example, and for those you had to use --add-modules or they weren’t visible to 
the unnamed module.

With JDK 11 I started getting compile errors that the java.util.logging package 
wasn’t known until I started invoking java with --add-modules=java.logging. I 
may have been struggling with other module issues at the time that could have 
caused that.

But either way, auto-complete in NetBeans can’t “see” the java.util.logging 
package.  “logging” is not offered as a suggestion for auto-complete.  With a 
Gradle project (using the netbeans gradle plugin 2.0.2 
http://plugins.netbeans.org/plugin/44510/gradle-support 
<http://plugins.netbeans.org/plugin/44510/gradle-support>) it will even 
highlight the import line as an error.

Something seems wrong to me.

Just make a new Java Application project - with no module-info.java, and start 
typing:

import java.util.

and see what you get for auto-complete.

Scott

> On Jan 7, 2019, at 1:49 PM, Jan Lahoda <[email protected]> wrote:
> 
> Sorry, I am a bit puzzled: I assumed we are talking about a project that is
> in the unnamed Jigsaw module, right? Then that should see java.logging even
> without any --add-modules?
> 
> Jan
> 
> On Mon, Jan 7, 2019 at 7:02 PM Scott Palmer <[email protected]> wrote:
> 
>> What about the auto-complete not working in the Ant-Based project?
>> How do you tell an Ant-based project which optional modules to include?
>> 
>> Scott
>> 
>> 
>>> On Jan 7, 2019, at 12:59 PM, Geertjan Wielenga
>> <[email protected]> wrote:
>>> 
>>>> 
>>>> I can make the changes to my Gradle build script to have these options
>>>> set, but NetBeans remains ignorant of the added modules
>>>> 
>>> 
>>> NetBeans does not support Gradle at this point.
>>> 
>>> Gj
>>> 
>>> On Mon, Jan 7, 2019 at 6:32 PM Scott Palmer <[email protected]> wrote:
>>> 
>>>> I’m copying both the users and dev lists because  1) I tried a similar
>>>> question on the users list where I think this belongs and got no
>> response,
>>>> 2) something is wrong and there should be a discussion with  devs.
>>>> 
>>>> Netbeans does not seem to have any place to add modules for non-modular
>>>> applications.
>>>> 
>>>> (I assert that most significantly complex applications cannot be
>>>> modularized at this point because sooner or later the dependency chain
>> will
>>>> hit a non-modularized library.)
>>>> 
>>>> For example the java.logging module is part of the JDK but needs to be
>>>> added as a dependency using "--add-module java.logging”.
>>>> 
>>>> I can make the changes to my Gradle build script to have these options
>>>> set, but NetBeans remains ignorant of the added modules and thus
>> highlights
>>>> the code as if it contains errors.  Everything builds fine though.  I
>> can’t
>>>> find any place in NetBeans to add this information.  I even tried
>> editing
>>>> the etc/netbeans.conf file to add a -J--add-modules=ALL-SYSTEM to the
>>>> default options, but that didn’t seem to have any effect on whatever
>> code
>>>> is determining where all those red squiggles go.
>>>> 
>>>> Thinking maybe this was just a Gradle integration issue, I tried an
>>>> Ant-based project (which is not an option for my real work).  There I
>>>> noticed different behaviour.  I was able to import java.util.logging.*
>>>> without it showing as an error, but curiously the auto-complete would
>> not
>>>> suggest that there was such a package called ‘logging’ after typing
>>>> java.util.  Though once I typed it manually, suggestions for classes in
>> the
>>>> java.util.logging package were made.
>>>> 
>>>> It seems there are still a lot of rough edges regarding the module
>> system.
>>>> I didn’t find anything in JIRA, but I can’t imagine that this isn’t a
>> known
>>>> issue.  What am I missing?
>>>> 
>>>> Regards,
>>>> 
>>>> Scott
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>> 
>>>> For further information about the NetBeans mailing lists, visit:
>>>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>>> 
>>>> 
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>> 
>> 
>> 
>> 

Reply via email to