afterburner.fx
afterburner.fx copied to clipboard
afterburner.fx not working with java 9
If I compile my afterburner.fx project in Java 9 und start it with Java 9 i get the following error:
Caused by: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct at com.airhacks.afterburner.injection.Injector.initialize(Injector.java:176) at com.airhacks.afterburner.injection.Injector.injectAndInitialize(Injector.java:123) at com.airhacks.afterburner.injection.Injector.instantiateModelOrService(Injector.java:111) at com.airhacks.afterburner.injection.Injector.injectMembers(Injector.java:144) at com.airhacks.afterburner.injection.Injector.injectMembers(Injector.java:129) at com.airhacks.afterburner.injection.Injector.injectAndInitialize(Injector.java:122) at com.airhacks.afterburner.injection.Injector.registerExistingAndInject(Injector.java:103) at com.airhacks.afterburner.injection.Injector.instantiatePresenter(Injector.java:56) at com.airhacks.afterburner.views.FXMLView.lambda$loadSynchronously$1(FXMLView.java:85) at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:933) at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:975) at javafx.fxml/javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:222) at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:747) at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2718) at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2547) at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2461) at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2430) at com.airhacks.afterburner.views.FXMLView.loadSynchronously(FXMLView.java:87) at com.airhacks.afterburner.views.FXMLView.initializeFXMLLoader(FXMLView.java:96) at com.airhacks.afterburner.views.FXMLView.getView(FXMLView.java:108)
That's because javax.xml.ws.annotation, the module that contains the @PostConstruct annotation is deprecated for removal. there is a work around: You can start the app with the following vm arg: --add-modules java.xml.ws.annotation
I had the same issue. The workaround, adding the vm arg: --add-modules java.xml.ws.annotation helped me.
same problem for me too
Adding javax.annotation-api as dependency (e.g. via mvnrepository) works for me in Java 10.0.1 and should work around the issue even with Java 11, when java.xml.ws.annotation is planned to be removed from the Java SE Platform and the JDK (see JEP 320: Remove the Java EE and CORBA Modules)