You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by "Jack W." <so...@gmail.com> on 2022/01/15 16:53:21 UTC

Package x is declared in module y which is not in the module graph

NB 12.6 downloaded today:

I started a project and added the dependent jars to the libraries in the
Properties dialog.

But when I do an import I get the message:

Package *x* is declared in module *y* which is not in the module graph

I've been using NetBeans since Xelfi and have never seen this before.
What is a "module graph"?
How do I fix this?

-- 
Jack Woehr               # If it doesn't work in Firefox,
Box 51, Golden CO 80402  # it's broken.
http://www.softwoehr.com # Just Say No to Chrome.

Re: Package x is declared in module y which is not in the module graph

Posted by "Jack W." <so...@gmail.com>.
Hi John ..

I had that thought, so I jumped out of NetBeans, chose Java 11, and my code
compiles and runs as-is.
So I'm not sure what NetBeans is enforcing that straight Java 11 does not?

$ export JAVA_HOME=`/usr/libexec/java_home -v 11`
$ java --version
openjdk 11.0.12 2021-07-20
OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7)
OpenJDK 64-Bit Server VM Temurin-11.0.12+7 (build 11.0.12+7, mixed mode)
$ javac --version
javac 11.0.12


On Sat, Jan 15, 2022 at 3:07 PM John Mc <mc...@gmail.com> wrote:

> Could this be related to the Java Module System from Java 9+?
>
> Not used JMSmyself, just guessing here...
>
>
-- 
Jack Woehr               # If it doesn't work in Firefox,
Box 51, Golden CO 80402  # it's broken.
http://www.softwoehr.com # Just Say No to Chrome.

Re: Package x is declared in module y which is not in the module graph

Posted by John Mc <mc...@gmail.com>.
Could this be related to the Java Module System from Java 9+?

Not used JMSmyself, just guessing here...

John

On Sat 15 Jan 2022, 22:01 Jack W., <so...@gmail.com> wrote:

>
> Not sure what's exporting to what, then.
> This is a one-file project.
> What is the brilliant idea here that I am missing by which Java imports
> work completely differently than they have for almost 30 years?
>
> On Sat, Jan 15, 2022 at 12:40 PM Mark A. Flacy <mf...@verizon.net.invalid>
> wrote:
>
>> Greetings,
>>
>> That's not a maven error message but one from javac.
>>
>> --
>> Mark A. Flacy
>> mflacy@verizon.net
>>
>> On 2022 M01 15, Sat 13:00:40 CST Jack W. wrote:
>> > Doesn't seem relevant, I'm not using Maven.
>> >
>> >
>> > On Sat, Jan 15, 2022 at 10:49 AM Mark A. Flacy
>> <mf...@verizon.net.invalid>
>> >
>> > wrote:
>> > > Greetings,
>> > >
>> > >
>> > >
>> https://stackoverflow.com/questions/57421537/java-11-package-is-declared-i
>> > > n-module-which-does-not-export-it
>> > >
>> > > --
>> > >
>> > > Mark A. Flacy
>> > >
>> > > mflacy@verizon.net
>> > >
>> > > On 2022 M01 15, Sat 10:53:21 CST Jack W. wrote:
>> > > > NB 12.6 downloaded today:
>> > > >
>> > > >
>> > > >
>> > > > I started a project and added the dependent jars to the libraries
>> in the
>> > > >
>> > > > Properties dialog.
>> > > >
>> > > >
>> > > >
>> > > > But when I do an import I get the message:
>> > > >
>> > > >
>> > > >
>> > > > Package *x* is declared in module *y* which is not in the module
>> graph
>> > > >
>> > > >
>> > > >
>> > > > I've been using NetBeans since Xelfi and have never seen this
>> before.
>> > > >
>> > > > What is a "module graph"?
>> > > >
>> > > > How do I fix this?
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > >
>> > > > Jack Woehr               # If it doesn't work in Firefox,
>> > > >
>> > > > Box 51, Golden CO 80402  # it's broken.
>> > > >
>> > > > http://www.softwoehr.com # Just Say No to Chrome.
>> >
>> > --
>> > Jack Woehr               # If it doesn't work in Firefox,
>> > Box 51, Golden CO 80402  # it's broken.
>> > http://www.softwoehr.com # Just Say No to Chrome.
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
> --
> Jack Woehr               # If it doesn't work in Firefox,
> Box 51, Golden CO 80402  # it's broken.
> http://www.softwoehr.com # Just Say No to Chrome.
>

Re: Package x is declared in module y which is not in the module graph

Posted by "Jack W." <so...@gmail.com>.
[image: image.png]


On Sat, Jan 15, 2022 at 3:21 PM Jack W. <so...@gmail.com> wrote:

>
>
> On Sat, Jan 15, 2022 at 3:17 PM Helmut Leininger <h....@gmx.at>
> wrote:
>
>> Just a guess. Is there a module-info file? If yes, you may try to delete
>> it
>>
>>
> No file with the string "module" in the name in my project nor in the
> imported .jar
>
>
-- 
Jack Woehr               # If it doesn't work in Firefox,
Box 51, Golden CO 80402  # it's broken.
http://www.softwoehr.com # Just Say No to Chrome.

Re: Package x is declared in module y which is not in the module graph

Posted by "Jack W." <so...@gmail.com>.
On Sat, Jan 15, 2022 at 3:17 PM Helmut Leininger <h....@gmx.at> wrote:

> Just a guess. Is there a module-info file? If yes, you may try to delete it
>
>
No file with the string "module" in the name in my project nor in the
imported .jar


-- 
Jack Woehr               # If it doesn't work in Firefox,
Box 51, Golden CO 80402  # it's broken.
http://www.softwoehr.com # Just Say No to Chrome.

Re: Package x is declared in module y which is not in the module graph

Posted by Helmut Leininger <h....@gmx.at>.
Just a guess. Is there a module-info file? If yes, you may try to delete it



Mit freundlichen Grüßen 
Helmut Leininger 

Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

Am 15. Jänner 2022 23:00:46 MEZ schrieb "Jack W." <so...@gmail.com>:
>Not sure what's exporting to what, then.
>This is a one-file project.
>What is the brilliant idea here that I am missing by which Java imports
>work completely differently than they have for almost 30 years?
>
>On Sat, Jan 15, 2022 at 12:40 PM Mark A. Flacy <mf...@verizon.net.invalid>
>wrote:
>
>> Greetings,
>>
>> That's not a maven error message but one from javac.
>>
>> --
>> Mark A. Flacy
>> mflacy@verizon.net
>>
>> On 2022 M01 15, Sat 13:00:40 CST Jack W. wrote:
>> > Doesn't seem relevant, I'm not using Maven.
>> >
>> >
>> > On Sat, Jan 15, 2022 at 10:49 AM Mark A. Flacy
>> <mf...@verizon.net.invalid>
>> >
>> > wrote:
>> > > Greetings,
>> > >
>> > >
>> > >
>> https://stackoverflow.com/questions/57421537/java-11-package-is-declared-i
>> > > n-module-which-does-not-export-it
>> > >
>> > > --
>> > >
>> > > Mark A. Flacy
>> > >
>> > > mflacy@verizon.net
>> > >
>> > > On 2022 M01 15, Sat 10:53:21 CST Jack W. wrote:
>> > > > NB 12.6 downloaded today:
>> > > >
>> > > >
>> > > >
>> > > > I started a project and added the dependent jars to the libraries in
>> the
>> > > >
>> > > > Properties dialog.
>> > > >
>> > > >
>> > > >
>> > > > But when I do an import I get the message:
>> > > >
>> > > >
>> > > >
>> > > > Package *x* is declared in module *y* which is not in the module
>> graph
>> > > >
>> > > >
>> > > >
>> > > > I've been using NetBeans since Xelfi and have never seen this before.
>> > > >
>> > > > What is a "module graph"?
>> > > >
>> > > > How do I fix this?
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > >
>> > > > Jack Woehr               # If it doesn't work in Firefox,
>> > > >
>> > > > Box 51, Golden CO 80402  # it's broken.
>> > > >
>> > > > http://www.softwoehr.com # Just Say No to Chrome.
>> >
>> > --
>> > Jack Woehr               # If it doesn't work in Firefox,
>> > Box 51, Golden CO 80402  # it's broken.
>> > http://www.softwoehr.com # Just Say No to Chrome.
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>>
>>
>
>-- 
>Jack Woehr               # If it doesn't work in Firefox,
>Box 51, Golden CO 80402  # it's broken.
>http://www.softwoehr.com # Just Say No to Chrome.

Re: Package x is declared in module y which is not in the module graph

Posted by "Jack W." <so...@gmail.com>.
Not sure what's exporting to what, then.
This is a one-file project.
What is the brilliant idea here that I am missing by which Java imports
work completely differently than they have for almost 30 years?

On Sat, Jan 15, 2022 at 12:40 PM Mark A. Flacy <mf...@verizon.net.invalid>
wrote:

> Greetings,
>
> That's not a maven error message but one from javac.
>
> --
> Mark A. Flacy
> mflacy@verizon.net
>
> On 2022 M01 15, Sat 13:00:40 CST Jack W. wrote:
> > Doesn't seem relevant, I'm not using Maven.
> >
> >
> > On Sat, Jan 15, 2022 at 10:49 AM Mark A. Flacy
> <mf...@verizon.net.invalid>
> >
> > wrote:
> > > Greetings,
> > >
> > >
> > >
> https://stackoverflow.com/questions/57421537/java-11-package-is-declared-i
> > > n-module-which-does-not-export-it
> > >
> > > --
> > >
> > > Mark A. Flacy
> > >
> > > mflacy@verizon.net
> > >
> > > On 2022 M01 15, Sat 10:53:21 CST Jack W. wrote:
> > > > NB 12.6 downloaded today:
> > > >
> > > >
> > > >
> > > > I started a project and added the dependent jars to the libraries in
> the
> > > >
> > > > Properties dialog.
> > > >
> > > >
> > > >
> > > > But when I do an import I get the message:
> > > >
> > > >
> > > >
> > > > Package *x* is declared in module *y* which is not in the module
> graph
> > > >
> > > >
> > > >
> > > > I've been using NetBeans since Xelfi and have never seen this before.
> > > >
> > > > What is a "module graph"?
> > > >
> > > > How do I fix this?
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Jack Woehr               # If it doesn't work in Firefox,
> > > >
> > > > Box 51, Golden CO 80402  # it's broken.
> > > >
> > > > http://www.softwoehr.com # Just Say No to Chrome.
> >
> > --
> > Jack Woehr               # If it doesn't work in Firefox,
> > Box 51, Golden CO 80402  # it's broken.
> > http://www.softwoehr.com # Just Say No to Chrome.
>
>
>
>
>
> ---------------------------------------------------------------------
> 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
>
>

-- 
Jack Woehr               # If it doesn't work in Firefox,
Box 51, Golden CO 80402  # it's broken.
http://www.softwoehr.com # Just Say No to Chrome.

Re: Package x is declared in module y which is not in the module graph

Posted by "Mark A. Flacy" <mf...@verizon.net.INVALID>.
Greetings,
  
That's not a maven error message but one from javac.

-- 
Mark A. Flacy
mflacy@verizon.net

On 2022 M01 15, Sat 13:00:40 CST Jack W. wrote:
> Doesn't seem relevant, I'm not using Maven.
> 
> 
> On Sat, Jan 15, 2022 at 10:49 AM Mark A. Flacy <mf...@verizon.net.invalid>
> 
> wrote:
> > Greetings,
> > 
> > 
> > https://stackoverflow.com/questions/57421537/java-11-package-is-declared-i
> > n-module-which-does-not-export-it
> > 
> > --
> > 
> > Mark A. Flacy
> > 
> > mflacy@verizon.net
> > 
> > On 2022 M01 15, Sat 10:53:21 CST Jack W. wrote:
> > > NB 12.6 downloaded today:
> > > 
> > > 
> > > 
> > > I started a project and added the dependent jars to the libraries in the
> > > 
> > > Properties dialog.
> > > 
> > > 
> > > 
> > > But when I do an import I get the message:
> > > 
> > > 
> > > 
> > > Package *x* is declared in module *y* which is not in the module graph
> > > 
> > > 
> > > 
> > > I've been using NetBeans since Xelfi and have never seen this before.
> > > 
> > > What is a "module graph"?
> > > 
> > > How do I fix this?
> > > 
> > > 
> > > 
> > > --
> > > 
> > > Jack Woehr               # If it doesn't work in Firefox,
> > > 
> > > Box 51, Golden CO 80402  # it's broken.
> > > 
> > > http://www.softwoehr.com # Just Say No to Chrome.
> 
> --
> Jack Woehr               # If it doesn't work in Firefox,
> Box 51, Golden CO 80402  # it's broken.
> http://www.softwoehr.com # Just Say No to Chrome.





---------------------------------------------------------------------
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: Package x is declared in module y which is not in the module graph

Posted by "Jack W." <so...@gmail.com>.
Doesn't seem relevant, I'm not using Maven.


On Sat, Jan 15, 2022 at 10:49 AM Mark A. Flacy <mf...@verizon.net.invalid>
wrote:

> Greetings,
>
>
> https://stackoverflow.com/questions/57421537/java-11-package-is-declared-in-module-which-does-not-export-it
>
> --
>
> Mark A. Flacy
>
> mflacy@verizon.net
>
>
> On 2022 M01 15, Sat 10:53:21 CST Jack W. wrote:
>
> > NB 12.6 downloaded today:
>
> >
>
> > I started a project and added the dependent jars to the libraries in the
>
> > Properties dialog.
>
> >
>
> > But when I do an import I get the message:
>
> >
>
> > Package *x* is declared in module *y* which is not in the module graph
>
> >
>
> > I've been using NetBeans since Xelfi and have never seen this before.
>
> > What is a "module graph"?
>
> > How do I fix this?
>
> >
>
> > --
>
> > Jack Woehr               # If it doesn't work in Firefox,
>
> > Box 51, Golden CO 80402  # it's broken.
>
> > http://www.softwoehr.com # Just Say No to Chrome.
>
>
>

-- 
Jack Woehr               # If it doesn't work in Firefox,
Box 51, Golden CO 80402  # it's broken.
http://www.softwoehr.com # Just Say No to Chrome.

Re: Package x is declared in module y which is not in the module graph

Posted by "Mark A. Flacy" <mf...@verizon.net.INVALID>.
Greetings,

https://stackoverflow.com/questions/57421537/java-11-package-is-declared-in-module-which-does-not-export-it[1]

-- 
Mark A. Flacy
mflacy@verizon.net

On 2022 M01 15, Sat 10:53:21 CST Jack W. wrote:
> NB 12.6 downloaded today:
> 
> I started a project and added the dependent jars to the libraries in the
> Properties dialog.
> 
> But when I do an import I get the message:
> 
> Package *x* is declared in module *y* which is not in the module graph
> 
> I've been using NetBeans since Xelfi and have never seen this before.
> What is a "module graph"?
> How do I fix this?
> 
> --
> Jack Woehr               # If it doesn't work in Firefox,
> Box 51, Golden CO 80402  # it's broken.
> http://www.softwoehr.com # Just Say No to Chrome.



--------
[1] https://stackoverflow.com/questions/57421537/java-11-package-is-declared-in-module-which-does-not-export-it