Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

afterburner.fx not working with java 9 #75

Open
saxmaster79 opened this issue Apr 17, 2017 · 3 comments
Open

afterburner.fx not working with java 9 #75

saxmaster79 opened this issue Apr 17, 2017 · 3 comments

Comments

@saxmaster79
Copy link

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

@marcopenhacking
Copy link

I had the same issue. The workaround, adding the vm arg: --add-modules java.xml.ws.annotation helped me.

@jasons2000
Copy link

same problem for me too

@marcopenhacking
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants