1

i used the current versions of Eclipse and Java. I try to moved my RCP application from Java 8 to Java 11. My applications runs but now i have functional issues because i have to remove the @PostConstruct annotation from my code.

Exist any other alternative for this injection annotation?

Darksmilie
  • 193
  • 1
  • 11
  • i find a way to replace it with for example for "init" method but what can do for method with patameters (e.g. public void createControls(Composite parent))? I use this way to replace the methods without parameter: https://better-coding.com/spring-postconstruct-and-predestroy-alternatives-in-java-9/ – Darksmilie Feb 08 '19 at 12:19

1 Answers1

2

For Eclipse e4 the PostConstruct annotation is in the javax.annotation plug-in. Add that as a dependency to your plug-ins and continue to use PostConstruct.

greg-449
  • 109,219
  • 232
  • 102
  • 145