0

I have researched this twice now and ran into this problem twice from different sources. I have read all the articles I can find and the youtube videos don't seem to fix it. Here are two articles I read to show my due diligence before I am told this is a duplicate. (here, and here) There are more but I cannot find it.

Here is my code:

package encryptionComplex;

import java.awt.*;

public class EncryptionComplexMain {

    public static void main(String[] args) {
//stuff that is irrelevant and I deleted it
    }
}

And for the purposes of this post, here is what happens:

Error image

Basically - I cannot work out how to correctly import this java.awt package. Whether it is keywords "java.desktop" "windowsbuilder" or other things associated with this issue, it seems this failed importing the crux of my issue.

If it is not clear already, I am very new to java. I am attempting to, say, open up a file with text editor using a java program, or controlling the mouse using my script. It seems that all these functions rely on java.awt

I have tried installing it using the link and selecting any of the following links to download the packages: image of links in eclipse's software installer

For example, I would enter "General Purpose Tools - http://download.eclipse.org/releases/2020-03/202003181000" and select general purpose tools and download all of it and restart and all the rest.

My code still won't work.

Please advise - and for the record this is not a duplicate as all the other posts don't solve my issue.

Thank you for the help

Andreas
  • 154,647
  • 11
  • 152
  • 247
  • 2
    Look at this post, it might help you: https://stackoverflow.com/questions/51503140/the-import-java-awt-cannot-be-resolved – WannaBe Apr 20 '20 at 05:41
  • Hi - I had checked this post out - thanks for posting, but I don't get where "module-info.java" is located and how exactly to add "requires java.desktop;" to the file. – Neuralyzer Gaming Apr 21 '20 at 05:19
  • I managed to figure it out, this file was located at C:\Users\warre\eclipse-workspace\encryptionComplex\src - how can I access this through eclipse? – Neuralyzer Gaming Apr 21 '20 at 05:23

0 Answers0