Intellij project with idea.sh

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue Jun 29 16:13:21 UTC 2021


Hi,
thanks for trying the script and report back! Some comments inline:

On 29/06/2021 16:51, Sergei Ustimenko wrote:
> Hi,
>
> I had a small, perhaps even dummy, question about idea.sh and current version of Intellij and how
> to configure it for the core-libs source tree.
>
> It is very nice that there is a script to generate an idea project - it really saves a lot of time.
> I followed instructions https://mail.openjdk.java.net/pipermail/ide-support-dev/2021-January/000059.html
> from Maurizio, though when I generate the project, I get following:
> - all the classes in all modules are excluded from compilation (not sure if this is intended or not;
> all the classes' and source folders' icons in the project view have a tiny cross in the left upper corner).
This is intended - otherwise IntelliJ would try to build these classes 
itself (w/o using make - which won't work)
> - sdk is missing (but I, of course, can add it very easily - the one from the build/ folder)
That's also intended - I have not find a way to set up a project-wide 
SDK which can be configured from command line. SDKs are a global setting 
in IntelliJ.
> - there are classes in core-libs that don't have access to certain packages from other modules
> e.g. jdk.internal.net.http.HttpRequestBuilderImpl can't access HttpHeadersBuilder because of
> the following problem: "Package 'jdk.internal.net.http.common' is declared in module
> 'java.net.http', which does not export it to the unnamed module". Ide highlights all such occurrences
> red although it indexes them and I can jump to them. I can add it these modules manually but I don't
> think it the best way to move forward.

Uhmmm - I can't seem to be able to reproduce this one, but occasionally 
I did witness something similar. Have you tried updating your SDK to 
something more recent?  E.g is it possible that the SDK you are using is 
old-ish (e.g. Java 16 or something?)

Thanks
Maurizio

>
> I am not sure if I'm missing anything or doing something wrong but could you please guide me
> a bit or point in the right direction how can I set up Intellij Idea to work with core-libs properly.
> I don't really want my setup to backfire.
>
> I use Intellij Idea 2021.1.2, ant-1.10.10 to run idea.sh and openjdk build with make works fine for me.
>
> Thanks,
> Sergei


More information about the ide-support-dev mailing list