I try to get started with Eclipse 4-10 and SWT, but importing the SWT Library in the java project doesn't work.
Here is what I did:
But the import statements in the testwindow.java still show "the import org.eclipse cannot be resolved".
The setup process is according to the official eclipse site: https://www.eclipse.org/swt/eclipse.php
I use Windows 10 64bit, eclipse and SWT are both 64bit-versions too.
What am I missing?
In case you have a module-info.java
file in the default package, delete it .
Having a module-info.java
file enables the optional use of the Java Platform Module System (JPMS) which requires to specify all required modules.
Instead of deleting module-info.java
you can also:
module-info.java
add the line requires org.eclipse.swt;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.