I'm using IntelliJ IDEA 12 Ultimate for the trial period and came across a bit of a weird issue. While going through the code for a recent tutoring job, I had the screenshot below after trying to compile a class:
The error output is after pressing Ctrl-Shift-F9 to compile the class DrawCircleLab8
. As you can see, DrawingPanel
is indeed in package lab8
and there are no errors until the compile time exception.
When I imported the exact same project structure in Eclipse, I was able to compile and run without a problem.
Changing the SDK from 1.7 to 1.6 had no effect. How can I resolve this issue for IntelliJ?
Try removing import statement for this class and then adding it once again.
From your screenshot I assume that src
is already marked as a source root, but to be sure you can do this once again:
src
in the Project TreeMark as... -> Source root
If the above won't work, try to compile whole project first. Compiling only one class may not work if you had never compiled the rest of the project before.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With