Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » A Newbie's ??(Building the HelloWorld Cheat Sheet Example)
A Newbie's ?? [message #1853034] Wed, 15 June 2022 09:52 Go to next message
Eclipse UserFriend
followed the steps in the cheat sheet for HelloWorld
getting a HelloWorld.class in the /bin dir

HelloWorld.java code is

public class HelloWorld {

public static void main(String[] args) {
// TODO Auto-generated method stub

System.out.println("Hello world!");

}

}


get the following error
"Error occurred during initialization of boot layer
java.lang.module.FindException: Error reading module: C:\Users\Public\Athena\eclipse-workspace\HelloWorld\bin
Caused by: java.lang.module.InvalidModuleDescriptorException: HelloWorld.class found in top-level directory (unnamed package not allowed in module)"

the [b]module-ingfo.java[/b }that was created has this in it
module HelloWorld {
}

What am I missing ?
Re: A Newbie's ?? [message #1853046 is a reply to message #1853034] Wed, 15 June 2022 13:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Try to create a package (e.g. mypackage ) and move your class to it (you can use refactor).

or

delete module-info.java if you have one.

Regards.




Re: A Newbie's ?? [message #1853047 is a reply to message #1853046] Wed, 15 June 2022 14:09 Go to previous messageGo to next message
Eclipse UserFriend
delete module-info.java worked
thanks very much

deleteing module-info.class alone did not
but deleting module-info.java as well did

To continue
1) what is the module-info supposed to do ????

david mace


Re: A Newbie's ?? [message #1853048 is a reply to message #1853047] Wed, 15 June 2022 14:39 Go to previous message
Eclipse UserFriend
You are welcome,
May I suggest some reading first.
https://docs.oracle.com/javase/tutorial/

At this stage, I think that you can skip module-info.java
Search for module-info.java later on.

Also, I sugest you start using packages you can read about it in the The Java™ Tutorials .

Regards.
Eitan.




Previous Topic:Incorrect console encoding under Windows 11
Next Topic:Eclipse Needs a Better way of configuring Compilers
Goto Forum:
  


Current Time: Tue Jul 08 12:11:06 EDT 2025

Powered by FUDForum. Page generated in 0.05475 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top