eclipse-platform / .github

Common contribution content for eclipse-platform repositories
https://www.eclipse.org/eclipse/
4 stars 10 forks source link

@PostConstruct and @PreDestroy getting error even though i imported packages #163

Closed raghu225599 closed 7 months ago

raghu225599 commented 8 months ago

when iam using @PostConstruct and @PreDestroy annotations even though i imported the packages which are import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; getting error saying PostConstruct cannot be resolved to a type,same with PreDestroy also when using the eclipse IDE for Java and Web Developers 2020-06 version

jonahgraham commented 8 months ago

How have you added the javax.annotation package to your classpath?

raghu225599 commented 7 months ago

irrespective of the version, tthere get an error in the ide while adding @ PostConstruct and @PreDestroy so then adding this jar 'javax.annotation-api-1.3.2' solves the issue