In my machine (Windows 10), there are two versions of Java, Java 1.8 (JRE and JDK) and Java 10 (JRE and JDK).
Previously IF I set my Eclipse
Add javax.annotation-api-1.3.2.jar to your classpath. It works with JDK 10 as well. For more clarity on alternative approaches, go through below video link:
javax.annotation-api-1.3.2.jar
https://www.youtube.com/watch?v=jOYSRwwMLX8&list=PLzS3AYzXBoj9IBdtgXRSyZEwlU2QV-mGG&index=6