netbeans-gradle-project icon indicating copy to clipboard operation
netbeans-gradle-project copied to clipboard

[JDK9] module-info.java: 3rd party requires get highlighted as errors

Open markaren opened this issue 7 years ago • 8 comments

Netbeans IDE dev 201707250001 Gradle version 4.1-rc-1 Plugin version 2.0.0.1

As seen in the image below, 3rd party the require statement gets highlighted as an an error. The code itself compiles. Probably Netbeans doesn't know where to look for the .jar file. Maven projects and regular Netbeans projects does not have this highlight.

image

https://github.com/gradle-guides/building-java-9-modules can be used to replicate the issue.

markaren avatar Jul 26 '17 07:07 markaren

Thank you for the sample projects. I haven't yet looked at what NB requires me to implement for proper module support but I will soon get to it.

kelemen avatar Jul 26 '17 18:07 kelemen

I had to ask on the NB mailing list because the NB API is not clear on what I'm expected to do. I have tried aa few of my guess but they seemed to be wrong. So I will get back to this once an NB developer explains what NB expects me to do.

kelemen avatar Jul 30 '17 18:07 kelemen

@kelemen @markaren

Can be temporarily resolved by the following methods:

Netbeans - Create a Java Modular Project, Added Libraries

Then, your project will not highlight as errors.

qq20171116194127

iwangxiaodong avatar Nov 16 '17 11:11 iwangxiaodong

Sorry for still not taking care of this. Since, I have couple of other issues to attend to, I will try to find some time to finish this in the next few weeks.

kelemen avatar Nov 16 '17 20:11 kelemen

@kelemen

C:\Users\My\Documents\NetBeansProjects\JavaModularApplication\nbproject\project.properties

aaa

Nice! Waiting for you.

iwangxiaodong avatar Nov 17 '17 03:11 iwangxiaodong

Sorry for the extremly long delay. I have updated the nb9 branch to have - hopefully - proper JDK 9 support.

kelemen avatar Mar 17 '18 15:03 kelemen

Nice! @kelemen

iwangxiaodong avatar Mar 17 '18 20:03 iwangxiaodong

You can download a release from here: https://github.com/kelemen/netbeans-gradle-project/releases/download/v2.0.0.2/netbeans-gradle-plugin-2.0.0.2.nbm However, note that there is still a known issue with test sources as I could not yet figure out what NB expects me to do exactly.

kelemen avatar Mar 18 '18 21:03 kelemen