Eclipse RCP 2020-09 , Java JDK 11 , Window10
Step
1 . Create A Simple Plugin Project( click [ next ] [ finish ] )
2 . Require-Bundle: org.eclipse.jdt.core
3 . Create A Java File
import javax.lang.model.type.NullType;
public class A {
public static void main(String[] args) {
NullType type ;
}
}
Compilation error : The package javax.lang.model.type is accessible from more than one module: <unnamed>, java.compiler
I try not to rely on org.eclipse.jdt.core ( delete Require-Bundle: org.eclipse.jdt.core )
Compilation success !
It seems that there is a conflict between org.eclipse.jdt.core and javax.lang.model
I have imported almost all org.eclipse.xxx without this problem. Only org.eclipse.jdt.core has this problem
I also checked the internal information of org.eclipse.jdt.core and found no special settings
Why? How can I solve this problem ? Help me , please !
CodePudding user response:
Upgrading to eclipse 2021-12 can solve the problem
Thank you , @howlger