Stephan van Hulst wrote:When you add the module-info.java file to your project, the error message tells you exactly what's wrong: Your module descriptor declares that the 'sample' package is open for reflective access, but your module doesn't contain any package named 'sample'.
Without the module descriptor, the Java runtime manages to get past the module checking step, but fails in Main.java with a NullPointerException. This could have any reason, and we can't help you without seeing the source file.
Please also tell us how you are building and running your project.
Thanks for the response Stephan. I downloaded the ZIP file because I wanted to follow along for my course. When I unzipped it, it looked like
this.
So I just imported the "s3v1" file using IntelliJ because a classmate said, "It had all the necessary files". Prior to this I imported the whole "project" file and had even more problems.
I know i'm asking really fundamental questions and the answer is probably super simple. Thanks for helping me out!
Edit : It's also probably worth noting that when I go in to Project Structure in IntelliJ, it says that the out folder is excluded, you can see that
here.