Java – Eclipse – Why is module information important?

Eclipse – Why is module information important?… here is a solution to the problem.

Eclipse – Why is module information important?

I’m new to Java. Since yesterday! I installed Eclipse and imported the Spring libraries into it. But a strange problem occurred. There is an error in the import statement telling The type org.springframework.context.ApplicationContext is not accessible. Another error occurred after running the project (ApplicationContext related to the same topic cannot be resolved to a type).

At all costs! I’m confused. It took me a day. Searching forums such as stackoverflow and google didn’t solve my problem. Suddenly I see a pop-up message in Eclipse suggesting some solutions. Ignoring some of these valueless is adding modules to the module-info.java file. Incredibly, this solved the problem! The strangest thing is that I’ve never seen this solution on the relevant forum! The most annoying thing is, what if I never see that pop-up? Where did I do it wrong? Why doesn’t this solution exist on the internet?

Thank you very much!

Solution

Java

modules are new to Java 9; They allow you to specify exactly the dependencies your program needs, giving you more control over the size of your application – without having to carry around library code that you don’t use. This seems to mean that you need to say exactly what you want, which I guess will make you realize that you are introducing more modules.

So the reason you don’t see much information about modules in general is that they’re relatively new, and suspect I’m a longtime Java developer who has never seen module info files!

I

was wondering if Eclipse gave you some options when you created your project, and you inadvertently chose one that meant “yes, I want extra control to do mocules, I don’t mind doing more.” ”

Related Problems and Solutions