2015-01-29 5 views
1

내 javaFX 응용 프로그램을 실행할 때 다음 스택 추적을 얻었습니까? 실제로 문제의 원인은 무엇입니까? 나는 old dataFX lib 이외의 것을 제거하지 않았다. 나는 자바의 최신 버전과 javaFX 플러그인으로 이클립스를 사용하고있다.javaFX 응용 프로그램을 실행할 때 javax.inject가 누락되었습니다.

Exception in Application start method 

java.lang.reflect.InvocationTargetException 

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 

at java.lang.reflect.Method.invoke(Unknown Source) 

at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source) 

at com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source) 

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 

at java.lang.reflect.Method.invoke(Unknown Source) 

at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source) 

Caused by: java.lang.RuntimeException: Exception in Application start method 

at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source) 

at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$147(Unknown Source) 

at com.sun.javafx.application.LauncherImpl$$Lambda$48/1732398722.run(Unknown Source) 

at java.lang.Thread.run(Unknown Source) 

Caused by: java.lang.NoClassDefFoundError: javax/inject/Inject 

at io.datafx.controller.injection.InjectResourceType.getSupportedAnnotation(InjectResourceType.java:55) 

at io.datafx.controller.context.ContextResolver.getAnnotatedControllerResourceTypes(ContextResolver.java:87) 

at io.datafx.controller.context.ContextResolver.injectResources(ContextResolver.java:49) 

at io.datafx.controller.ViewFactory.createByController(ViewFactory.java:171) 

at io.datafx.controller.flow.FlowHandler.start(FlowHandler.java:140) 

at io.datafx.controller.flow.Flow.startInStage(Flow.java:406) 

at application.MainApp.start(MainApp.java:16) 

at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(Unknown Source) 

at com.sun.javafx.application.LauncherImpl$$Lambda$51/1285177093.run(Unknown Source) 

at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(Unknown Source) 

at com.sun.javafx.application.PlatformImpl$$Lambda$45/1051754451.run(Unknown Source) 

at com.sun.javafx.application.PlatformImpl.lambda$null$164(Unknown Source) 

at com.sun.javafx.application.PlatformImpl$$Lambda$47/483857893.run(Unknown Source) 

at java.security.AccessController.doPrivileged(Native Method) 

at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(Unknown Source) 

at com.sun.javafx.application.PlatformImpl$$Lambda$46/1775282465.run(Unknown Source) 

at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) 

at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) 

at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source) 

at com.sun.glass.ui.win.WinApplication$$Lambda$37/1109371569.run(Unknown Source) 

... 1 more 

Caused by: java.lang.ClassNotFoundException: javax.inject.Inject 

at java.net.URLClassLoader$1.run(Unknown Source) 

at java.net.URLClassLoader$1.run(Unknown Source) 

at java.security.AccessController.doPrivileged(Native Method) 

at java.net.URLClassLoader.findClass(Unknown Source) 

at java.lang.ClassLoader.loadClass(Unknown Source) 

at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) 

at java.lang.ClassLoader.loadClass(Unknown Source) 

... 21 more 

Exception running application application.MainApp 

답변

2

는 JavaEE 프레임 워크이므로 JavaSE 8 배포판에는 포함되어 있지 않습니다. javax.inject 구현을 포함하는 프로젝트에 번들로 제공되는 추가 라이브러리가 필요합니다. 나는 afterburner.fx이 javax.inject 구현을 포함하는 JavaFX 용 씬 프레임 워크의 예라고 믿는다.

+0

OP는 이것을 답변으로 표시해야합니다. –