You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Bob Schellink <sa...@gmail.com> on 2021/02/08 13:09:48 UTC

Netbeans code assist not picking up classes under JRE Full Profile

Hi all,

With the latest Netbeans12.2 the code assist isn't identifying certain
classes such as java.sql.Connection.

To produce,
1) Create new Java With Ant -> Java Application

In the main method of the generated class type:
Connection
 and press Ctrl-Space
I get no suggestion.

In the Projects view, right-click on project -> properties -> Sources ->
Change Source/Binary format to JDK8
the code completion works again.

Is this a known issue or I'm missing a config somewhere?

Environment:
Windows 10,
Java 14
Netbeans 12.2

Kind regards

Bob

Re: Netbeans code assist not picking up classes under JRE Full Profile

Posted by Thomas Kellerer <sh...@gmx.net>.
How do you do that with an Ant based project?

Those modules also don't show up when you expand the "JDK" node in the "Libraries" part of the projects window.

Thomas

Daoud Abdelmonem Faleh schrieb am 08.02.2021 um 14:19:
> Make sure you have Java.sql module imported
>  https://docs.oracle.com/en/java/javase/14/docs/api/java.sql/module-summary.html
>
> Sent from my iPhone
>
>> On 08/02/2021, at 14:10, Bob Schellink <sa...@gmail.com> wrote:
>>
>> 
>> Hi all,
>>
>> With the latest Netbeans12.2 the code assist isn't identifying certain classes such as java.sql.Connection.
>>
>> To produce,
>> 1) Create new Java With Ant -> Java Application
>>
>> In the main method of the generated class type:
>> Connection
>>  and press Ctrl-Space
>> I get no suggestion.
>>
>> In the Projects view, right-click on project -> properties -> Sources -> Change Source/Binary format to JDK8 
>> the code completion works again.
>>
>> Is this a known issue or I'm missing a config somewhere?
>>
>> Environment:
>> Windows 10,
>> Java 14
>> Netbeans 12.2
>>
>> Kind regards
>>
>> Bob

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

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


Re: Netbeans code assist not picking up classes under JRE Full Profile

Posted by Lisa Ruby <lb...@protonmail.com.INVALID>.
I am having the same problem with Netbeans 12.0 on Windows. I use ANT. I understand the overall concept of modules. When I use anything from java.sql in my code and try using Ctrl-Shift-I to have Netbeans add the import statements to the code file, it doesn't work. Same as what Bob reported. The Classes and Sources lists for my Platform for my project, which uses AdoptOpenJDK 11.0.9-hotspot, contain java.sql. What else exactly needs to be done to make sure I have java.sql module imported?

Thank you.

Lisa

On 2/8/2021 5:19 AM, Daoud Abdelmonem Faleh wrote:

> Make sure you have Java.sql module imported
> [https://docs.oracle.com/en/java/javase/14/docs/api/java.sql/mo](https://docs.oracle.com/en/java/javase/14/docs/api/java.sql/module-summary.html)

Re: Netbeans code assist not picking up classes under JRE Full Profile

Posted by Daoud Abdelmonem Faleh <ab...@gmail.com>.
I guess it will be useful to learn about JPMS and module-info.java syntax even if the IDE provides GUI  for them

 https://www.oracle.com/corporate/features/understanding-java-9-modules.html

Sent from my iPhone

> On 08/02/2021, at 14:59, Bob Schellink <sa...@gmail.com> wrote:
> 
> 
>> On Mon, Feb 8, 2021 at 3:19 PM Daoud Abdelmonem Faleh <ab...@gmail.com> wrote:
> 
>> Make sure you have Java.sql module imported
>>  https://docs.oracle.com/en/java/javase/14/docs/api/java.sql/module-summary.html
> 
> Ah right. Guess I thought setting to Full JRE will do that for me :P
> 
> Thanks again.
> 
> Kind regards
> 
> Bob
> 
> PS: This is my first time using Apache Netbeans (from Netbeans 8.2) and whoever did the Dark theme overhaul, I hope you got a bonus cheque. It's just awesome :) 
> 

Re: Netbeans code assist not picking up classes under JRE Full Profile

Posted by Bob Schellink <sa...@gmail.com>.
On Mon, Feb 8, 2021 at 3:19 PM Daoud Abdelmonem Faleh <
abdelmonem.faleh@gmail.com> wrote:

> Make sure you have Java.sql module imported
>
> https://docs.oracle.com/en/java/javase/14/docs/api/java.sql/module-summary.html
>

Ah right. Guess I thought setting to Full JRE will do that for me :P

Thanks again.

Kind regards

Bob

PS: This is my first time using Apache Netbeans (from Netbeans 8.2) and
whoever did the Dark theme overhaul, I hope you got a bonus cheque. It's
just awesome :)

Re: Netbeans code assist not picking up classes under JRE Full Profile

Posted by Daoud Abdelmonem Faleh <ab...@gmail.com>.
Make sure you have Java.sql module imported
 https://docs.oracle.com/en/java/javase/14/docs/api/java.sql/module-summary.html

Sent from my iPhone

> On 08/02/2021, at 14:10, Bob Schellink <sa...@gmail.com> wrote:
> 
> 
> Hi all,
> 
> With the latest Netbeans12.2 the code assist isn't identifying certain classes such as java.sql.Connection.
> 
> To produce,
> 1) Create new Java With Ant -> Java Application
> 
> In the main method of the generated class type:
> Connection
>  and press Ctrl-Space
> I get no suggestion.
> 
> In the Projects view, right-click on project -> properties -> Sources -> Change Source/Binary format to JDK8 
> the code completion works again.
> 
> Is this a known issue or I'm missing a config somewhere?
> 
> Environment:
> Windows 10,
> Java 14
> Netbeans 12.2
> 
> Kind regards
> 
> Bob