Reputation: 179
The title said it all. I can't import neither java.awt.* nor java.swing.* in Intellij Idea. This is my project structure.
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
Upvotes: 4
Views: 6255
Reputation: 179
This is how i done it. It seems that i need to include a module-info.java file
and inside that put the follwoings.
module project.name {
requires java.datatransfer;
requires java.desktop;
}
I can't come up with a better answer right now. but this solved the initial problem.
Upvotes: 9