You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Sean Carrick <se...@pekinsoft.com> on 2023/02/15 17:00:59 UTC

HELP!!! java.sql not showing in Project/Libraries/JDK node and Configuration Settings

GJ, JT, MB, Ernie, ANYONE!

I've been trying to explain to a guy regarding the /java.sql/ module use 
in NetBeans projects and am having trouble getting him to understand 
what I'm saying. I could really use some help with this.

He is stuck on the fact that, even though the /java.sql/ module is 
present in the Java Platforms dialog, he is not seeing listed under the 
Libraries/JDK node in the Projects window. Also, he is not able to use 
Fix Imports to bring in the import statements for the SQL API classes in 
his Code Editor.

I've noticed these problems since sometime around the release of (go 
figure) JDK-9, but have always known that I can manually type in the 
/import/ statements for the /java.sql/ classes that I need. I have 
explained this to him in many different ways, and have even sent him an 
MP4 showing me doing that, even though the SQL module is not listed 
under the JDK Library node in Projects. He still is hung up on the fact 
that the /java.sql/ module is not present.

Is there a setting somewhere, or a command-line parameter that can 
passed to the launcher, that will let /java.sql/ show in the Projects 
window? Is there an issue filed against this, by chance? If not, should 
I file an issue against this?

Any help any of you can give me to assist this guy is fantastically, 
greatly appreciated...He is driving me crazy!😉

-SC


Re: HELP!!! java.sql not showing in Project/Libraries/JDK node and Configuration Settings

Posted by Matthias Bläsing <mb...@doppel-helix.eu.INVALID>.
Hi Sean,

Am Mittwoch, dem 15.02.2023 um 11:00 -0600 schrieb Sean Carrick:
> I've been trying to explain to a guy regarding the java.sql module
> use in NetBeans projects and am having trouble getting him to
> understand what I'm saying. I could really use some help with this.
> He is stuck on the fact that, even though the java.sql module is
> present in the Java Platforms dialog, he is not seeing listed under
> the Libraries/JDK node in the Projects window. Also, he is not able
> to use Fix Imports to bring in the import statements for the SQL API
> classes in his Code Editor.

You did not specify the project type. I'll assume it is an ant project
with type "Java Modular Project". By default a modular project only has
access to java.base. To extend this a module-info.java file in the
default package has to be created. Sample:

module newmodule {
    requires java.sql;
}

Here I declare, that my module is named newmodule and depends on
java.sql. NetBeans recognises this and "magically" makes the classes
available.


HTH

Matthias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists