[
https://issues.apache.org/jira/browse/NETBEANS-6191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17442309#comment-17442309
]
Neil C Smith commented on NETBEANS-6191:
----------------------------------------
Please see if you can replicate the issue with NetBeans 12.5. NetBeans 11.0 has
long been unsupported.
> Netbeans Java Editor fails to recognize java.sql module types
> -------------------------------------------------------------
>
> Key: NETBEANS-6191
> URL: https://issues.apache.org/jira/browse/NETBEANS-6191
> Project: NetBeans
> Issue Type: Bug
> Components: java - Editor
> Affects Versions: 12.2
> Reporter: k thurston ng
> Priority: Blocker
> Attachments: nebeans-platform-modules.png, netbeans-modules.png
>
>
> *Product Version:* Apache NetBeans IDE 11.0 (Build
> incubator-netbeans-release-404-on-20190319)
> *Java:* 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9-LTS
> *Runtime:* OpenJDK Runtime Environment 11.0.2+9-LTS
> *System:* Windows 10 version 10.0 running on amd64;
>
> I'm using the "Java with Ant -> Java Class Library" project template
>
> In the Java Editor, when trying to use any of the classes included in the
> java.sql module (e.g. java.sql.Connection, java.sql.DriverManager, etc.) -
> many of the features of the java editor don't work.
>
> auto-completion when importing java.sql.Connection (not a big deal, I can
> just type it "manually"), but
> if I Ctl-click on the import (to view source) - nothing happens
> Similarly if I select the type and then go to view its JavaDoc in the JavaDoc
> window, it displays "JavaDoc not found"
>
> Note: I can build the project no problem, I can run Junit 4 tests – no
> problem - so I'm fairly confident in my deduction that the ant scripts are
> not at issue, and clearly the run-time system is able to find, load, and
> verify the necessary types with no issue, so it's not as if my JDK image is
> at issue.
>
> What I have noticed however, is that the java.sql module is not listed in the
> project window, libraries:
>
> !netbeans-modules.png!
>
> So is there a problem with the "platform" definition:
>
> !nebeans-platform-modules.png!
>
> Sure seems not to be, the platform manager window lists java.sql as expected.
>
> I realize that these "problems" (the editor vis a vis the project-window) may
> be entirely unrelated. But what I have noticed is that I only encounter this
> editor problem when it comes to types that are defined in modules that are
> *not* listed/displayed in the project window (the problem is not restricted
> to java.sql module, same goes for java.logging, and I'm sure many others).
>
> This is a bit baffling; I used the jmod command line tool to look at the
> module definitions for java.sql and say java.xml and I don't see anything
> that would distinguish them and result in one (java.sql) being "unrecognized"
> and the other (java.xml) being recognized by the editor/project window
>
> I saw in the netbeans.conf file that there are a lot --add-opens and
> --add-exports JVM parameters, and I tried to explicitly
> --add-modules=ALL-DEFAULT, but that had no effect.
>
> Also, the sources for java.sql are in the same .zip file as for all the other
> sources, same for the javadoc - so it's not that the sources or javadoc are
> missing - the same src.zip work fine, again, for all the types included in
> the listed platform modules in the properties window.
>
> I can only surmise that the netbeans code that, presumably using reflection,
> lists all the "system" modules (which is used to populate the
> property-window->Libraries) is somehow ignoring java.sql, java.logging, etc.
> Although, again, I don't really see on what basis it privileges some modules
> over others (and of course the same bug isn't afflicting the platform manager
> window as shown above)
>
> P.S. I've also encountered this exact same bug using Netbeans 12.2 and
> JDK-15 on another computer - so it's not specific to either the JDK or
> Netbeans version; I also looked in the Netbeans log and couldn't find any
> message that seems to relate to this problem.
>
>
>
>
>
>
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
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