I want to create a cool app in JavaFX. When I installed NetBeans IDE and did all stuff around, I'm not able to run project, because there is no visible (available Java class).
Create project:
Make sure that Create application class check box is selected.
Try to run my project, but there is no Java class.
Can you help me please guys?
Is there any problem with IDE or with the code?
Mycoolproject.java -> Right Click -> RUn file:
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$412(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3207)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
at mycoolproject.Mycoolproject.start(Mycoolproject.java:22)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$419(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$399(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$397(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$398(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$203(GtkApplication.java:139)
... 1 more
Exception running application mycoolproject.Mycoolproject
/...path..../mycoolproject/nbproject/build-impl.xml:1340: The following error occurred while executing this line:
/...path..../mycoolproject/nbproject/build-impl.xml:981: Java returned: 1
BUILD FAILED (total time: 0 seconds)
Related
I have written a javaFX windows application that runs great from within eclipse. I'd like to deploy it so that it can be executed on other windows computers. I have exported it as a runnable jar file. However, when I try to execute it, I get an Exception in application start method.
All the information I see online says I need to copy the VM Arguments from the project's run configurations. However, my VM Arguments text box in my project is completely blank.
I'm using eclipse with e(fx)clipse plugin installed. My project execution environment is 'JavaSE-1.8 (jre1.8.0_161)'
Here is the output when I try to run my application:
java -jar my_exported_jar.jar
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Location is not set.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2434)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at com.st.myst25app.MainApp.initStage(MainApp.java:52)
at com.st.myst25app.MainApp.start(MainApp.java:36)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
... 1 more
Exception running application com.st.myst25app.MainApp
I figured it out! Here are the lines of code where I was instantiating my FXMLLoader
FXMLLoader loader = new FXMLLoader();
loader.setLocation(MainApp.class.getResource("view/myfxml.fxml"));
I changed it to a full path from the root of my application and it worked:
FXMLLoader loader = new FXMLLoader();
loader.setLocation(MainApp.class.getResource("/src/path/to/view/myfxml.fxml"));
Good morning/afternoon/night! (as applies)
Today I tried to test my new learned skills in Java, from Windows 10 to Ubuntu 19.4 (freshly installed) using NetBeans 8.2 (same version in both OS's), and in my first compilation for the sample JavaFX application (I mean, a new "empty" project), I got an error can't solve.
ant -f /home/felipe/NetBeansProjects/demoJavaFXApp jfxsa-run
init:
Deleting: /home/felipe/NetBeansProjects/demoJavaFXApp/build/built-jar.properties
deps-jar:
Updating property file: /home/felipe/NetBeansProjects/demoJavaFXApp/build/built-jar.properties
compile:
Detected JavaFX Ant API version 1.3
jfx-deployment:
jar:
Copying 12 files to /home/felipe/NetBeansProjects/demoJavaFXApp/dist/run309629545
jfx-project-run:
Executing /home/felipe/NetBeansProjects/demoJavaFXApp/dist/run309629545/demoJavaFXApp.jar using platform /usr/local/jdk1.8.0_111/jre/bin/java
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745)
Caused by: javafx.fxml.LoadException:
file:/home/felipe/NetBeansProjects/demoJavaFXApp/dist/run309629545/demoJavaFXApp.jar!/mx/com/tiammatsoftware/demoJavaFXApp/FXMLDocument.fxml:9
at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
at javafx.fxml.FXMLLoader.access$700(FXMLLoader.java:103)
at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:922)
at javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(FXMLLoader.java:971)
at javafx.fxml.FXMLLoader$Element.processStartElement(FXMLLoader.java:220)
at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:744)
at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2707)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2527)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
at mx.com.tiammatsoftware.demoJavaFXApp.DemoJavaFXApp.start(DemoJavaFXApp.java:22)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
... 1 more
Caused by: java.lang.ClassNotFoundException: demojavafxapp.FXMLDocumentController
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at javafx.fxml.FXMLLoader$ValueElement.processAttribute(FXMLLoader.java:920)
... 22 more
Exception running application mx.com.tiammatsoftware.demoJavaFXApp.DemoJavaFXApp
Java Result: 1
Deleting directory /home/felipe/NetBeansProjects/demoJavaFXApp/dist/run309629545
jfxsa-run:
BUILD SUCCESSFUL (total time: 1 second)
Searched in The Net about that error and aparently is quite rare, 'cause found nothing.
Thanks in advance for any help provided.
Looks like FXMLDocument.fxml refers to demojavafxapp.FXMLDocumentController while you seems to use mx.com.tiammatsoftware.demoJavaFXApp package. Probably correct class name should be mx.com.tiammatsoftware.demoJavaFXApp.FXMLDocumentController.
I am using IntelliJ IDEA version 2017.1.5, and I would like to know how to export my Java project as a runnable application for Windows or Mac. I am developing on a Windows machine.
What I want is a program that on Windows or Mac, can be installed and then run by clicking an icon, just like you would open Google Chrome, Microsoft Word or any other application. So far I have only been able to export as an executable .jar file, but when I try to run it I get the following error:
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at com.sun.javafx.scene.control.skin.Utils.computeTextWidth(Utils.java:118)
at com.sun.javafx.scene.control.skin.LabeledSkinBase.computePrefWidth(LabeledSkinBase.java:734)
at javafx.scene.control.Control.computePrefWidth(Control.java:537)
at javafx.scene.Parent.prefWidth(Parent.java:915)
at javafx.scene.layout.Region.prefWidth(Region.java:1419)
at javafx.scene.layout.Region.computeChildPrefAreaWidth(Region.java:1728)
at javafx.scene.layout.GridPane.computePrefWidths(GridPane.java:1556)
at javafx.scene.layout.GridPane.computePrefWidth(GridPane.java:1242)
at javafx.scene.Parent.prefWidth(Parent.java:915)
at javafx.scene.layout.Region.prefWidth(Region.java:1419)
at com.sun.javafx.scene.control.skin.ScrollPaneSkin.computeScrollNodeSize(ScrollPaneSkin.java:929)
at com.sun.javafx.scene.control.skin.ScrollPaneSkin.layoutChildren(ScrollPaneSkin.java:822)
at javafx.scene.control.Control.layoutChildren(Control.java:578)
at javafx.scene.Parent.layout(Parent.java:1087)
at javafx.scene.Parent.layout(Parent.java:1093)
at javafx.scene.Parent.layout(Parent.java:1093)
at javafx.scene.Parent.layout(Parent.java:1093)
at javafx.scene.Scene.doLayoutPass(Scene.java:552)
at javafx.scene.Scene.preferredSize(Scene.java:1646)
at javafx.scene.Scene.impl_preferredSize(Scene.java:1720)
at javafx.stage.Window$9.invalidated(Window.java:846)
at javafx.beans.property.BooleanPropertyBase.markInvalid(BooleanPropertyBase.java:109)
at javafx.beans.property.BooleanPropertyBase.set(BooleanPropertyBase.java:144)
at javafx.stage.Window.setShowing(Window.java:922)
at javafx.stage.Window.show(Window.java:937)
at javafx.stage.Stage.show(Stage.java:259)
at view.VisualInterface.start(VisualInterface.java:182)
at model.Generator.start(Generator.java:57)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
... 1 more
Exception running application model.Generator
I would also like to note that I can't run this .jar file by double-clicking the icon in Windows Explorer, I have to run it from the command line like so:
java -jar UPCGen.jar
I would like to be able to export to both Mac and Windows. So either as a runnable .jar, or a .exe (and whatever the file extension is for Mac). Thanks in advance for any help.
JavaFX was working, but strangely, it throws Segmentation Fault (core dumped) now.
I don't know where the logs are kept, so I have launcher app/SceneBuilderApp.jar, just in case:
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Failed to load file:/opt/JavaFXSceneBuilder2.0/app/SceneBuilderApp.jar!/com/oracle/javafx/scenebuilder/app/DocumentWindow.fxml
at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractFxmlWindowController.makeRoot(AbstractFxmlWindowController.java:114)
at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractWindowController.getRoot(AbstractWindowController.java:91)
at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractWindowController.getScene(AbstractWindowController.java:111)
at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractWindowController.getStage(AbstractWindowController.java:134)
at com.oracle.javafx.scenebuilder.app.DocumentWindowController.openWindow(DocumentWindowController.java:1088)
at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.handleLaunch(SceneBuilderApp.java:418)
at com.oracle.javafx.scenebuilder.app.AppPlatform.requestStartGeneric(AppPlatform.java:139)
at com.oracle.javafx.scenebuilder.app.AppPlatform.requestStart(AppPlatform.java:106)
at com.oracle.javafx.scenebuilder.app.SceneBuilderApp.start(SceneBuilderApp.java:371)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
... 1 more
Caused by: java.lang.RuntimeException: Failed to load file:/opt/JavaFXSceneBuilder2.0/app/SceneBuilderApp.jar!/com/oracle/javafx/scenebuilder/app/info/InfoPanel.fxml
at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractFxmlPanelController.makePanel(AbstractFxmlPanelController.java:93)
at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractPanelController.getPanelRoot(AbstractPanelController.java:130)
at com.oracle.javafx.scenebuilder.app.DocumentWindowController.controllerDidLoadFxml(DocumentWindowController.java:985)
at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractFxmlWindowController.makeRoot(AbstractFxmlWindowController.java:110)
... 17 more
Caused by: java.lang.RuntimeException: Failed to load file:/opt/JavaFXSceneBuilder2.0/app/SceneBuilderKit.jar!/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StringAutoSuggestEditor.fxml
at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.EditorUtils.loadFxml(EditorUtils.java:483)
at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.EditorUtils.loadFxml(EditorUtils.java:463)
at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.AutoSuggestEditor.preInit(AutoSuggestEditor.java:124)
at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.AutoSuggestEditor.<init>(AutoSuggestEditor.java:118)
at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.AutoSuggestEditor.<init>(AutoSuggestEditor.java:103)
at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.ControllerClassEditor.<init>(ControllerClassEditor.java:51)
at com.oracle.javafx.scenebuilder.app.info.InfoPanelController.performInitialization(InfoPanelController.java:186)
at com.oracle.javafx.scenebuilder.app.info.InfoPanelController.controllerDidLoadFxml(InfoPanelController.java:173)
at com.oracle.javafx.scenebuilder.kit.editor.panel.util.AbstractFxmlPanelController.makePanel(AbstractFxmlPanelController.java:89)
... 20 more
Caused by: javafx.fxml.LoadException:
file:/opt/JavaFXSceneBuilder2.0/app/SceneBuilderKit.jar!/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/StringAutoSuggestEditor.fxml
at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2601)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2571)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.EditorUtils.loadFxml(EditorUtils.java:481)
... 28 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2566)
... 31 more
Caused by: java.lang.NullPointerException
at com.oracle.javafx.scenebuilder.kit.editor.panel.inspector.editors.AutoSuggestEditor.initialize(AutoSuggestEditor.java:142)
... 41 more
Exception running application com.oracle.javafx.scenebuilder.app.SceneBuilderApp
Environment
Ubuntu 16.04
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
I had the same problem as you did.
As in the thread already mentioned this seems to be a kernel bug. Updating Ubuntu as usually + running dist-upgrade did the trick for me.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
See here for information what dist-upgrade does.
Hi I want to start my java application on raspberry I export DISPLAY:=0.0
and next I start a program like this : /opt/jdk1.8.0/bin/java -jar Main.jar
and I see this :
Exception in Application start method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:367)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:305)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:894)
at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.IllegalArgumentException: Image dimensions must be positive (w,h > 0)
at javafx.scene.image.Image.<init>(Image.java:720)
at javafx.scene.image.WritableImage.<init>(WritableImage.java:74)
at application.Main4.makeTransparent(Main4.java:436)
at application.Main4.start(Main4.java:129)
at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:182)
at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:860)
at com.sun.glass.ui.lens.LensApplication.access$1800(LensApplication.java:58)
at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:917)
... 1 more
Exception running application application.Main4