Skip to content

afterburner.fx not working with java 9 #75

Open
@saxmaster79

Description

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions