Home >Java >javaTutorial >Why Won't Eclipse Oxygen Start Due to Java Annotation Errors?

Why Won't Eclipse Oxygen Start Due to Java Annotation Errors?

DDD
DDDOriginal
2024-12-22 16:57:16666browse

Why Won't Eclipse Oxygen Start Due to Java Annotation Errors?

Why won't eclipse oxygen start (for the first time)? [duplicate]

Problem: Eclipse Oxygen fails to launch, throwing a Java class not found exception related to the javax.annotation.PostConstruct and javax.annotation.PreDestroy annotations.

Answer:

To resolve this issue when using Eclipse Oxygen with Java 9, you need to modify the eclipse.ini file located in your Eclipse installation directory. Add the following line after the -vmargs line:

--add-modules=java.se.ee

This line ensures that the Java 9 module containing the missing classes is added to your Eclipse installation. Alternatively, you can use the following line:

--add-modules=ALL-SYSTEM

Additional Notes:

  • Eclipse Oxygen.1a (4.7.1a) is scheduled for release on October 11, 2017, with full Java 9 support.
  • If you encounter the error after the modification, try deleting the configuration folder within your Eclipse workspace and restarting Eclipse.

The above is the detailed content of Why Won't Eclipse Oxygen Start Due to Java Annotation Errors?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn