1

I want to import java.desktop to use a BufferedImage:

Import

But Eclipse shows me an error and says that it cannot be resolved to a module

module error

Although I added the JRE to the modulepath:

Modulepath

I am also using Maven for the project but importing an external library works fine.

Slaw
  • 37,820
  • 8
  • 53
  • 80
Tom Meyer
  • 23
  • 4
  • after adding this `requires java.desktop;` in `module-info.java` it works for me, and also you can expand `JRE System library` and check there – Ryuzaki L Nov 15 '19 at 03:54
  • 1
    Thanks for the comment. That's what I did as you can see in picture 2. What do you mean with "checking"? – Tom Meyer Nov 15 '19 at 13:53

1 Answers1

1

I just installed the newest version of eclipse and the error disappeared.

Tom Meyer
  • 23
  • 4