Hi,
I have this error when I start my jar, not in debug mode :
main._shserveur_stdout (java line: 958)
java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-5
at com.sun.javafx.tk.Toolkit.checkFxUserThread(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(Unknown Source)
at javafx.scene.Scene.addToDirtyList(Unknown Source)
at javafx.scene.Node.addToSceneDirtyList(Unknown Source)
at javafx.scene.Node.impl_markDirty(Unknown Source)
at javafx.scene.shape.Shape.impl_markDirty(Unknown Source)
at javafx.scene.Node.impl_geomChanged(Unknown Source)
at javafx.scene.text.Text.impl_geomChanged(Unknown Source)
at javafx.scene.text.Text.needsTextLayout(Unknown Source)
at javafx.scene.text.Text.needsFullTextLayout(Unknown Source)
at javafx.scene.text.Text.access$200(Unknown Source)
at javafx.scene.text.Text$2.invalidated(Unknown Source)
at javafx.beans.property.StringPropertyBase.markInvalid(Unknown Source)
at javafx.beans.property.StringPropertyBase.set(Unknown Source)
at javafx.beans.property.StringPropertyBase.set(Unknown Source)
at javafx.scene.text.Text.setText(Unknown Source)
at com.sun.javafx.scene.control.skin.TextAreaSkin.lambda$new$231(Unknown Source)
at com.sun.javafx.scene.control.skin.TextAreaSkin$$Lambda$143/345558392.invalidated(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.fireValueChangedEvent(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.markInvalid(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.invalidate(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.access$1300(Unknown Source)
at javafx.scene.control.TextInputControl.lambda$new$163(Unknown Source)
at javafx.scene.control.TextInputControl$$Lambda$74/566915750.invalidated(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
at javafx.scene.control.TextArea$TextAreaContent.insert(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.doSet(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.set(Unknown Source)
at javafx.scene.control.TextInputControl.setText(Unknown Source)
at anywheresoftware.b4j.objects.TextInputControlWrapper.setText(TextInputControlWrapper.java:44)
at b4j.example.main._shserveur_stdout(main.java:958)
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 anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4j.objects.Shell$EventOutput.write(Shell.java:158)
at org.apache.commons.exec.StreamPumper.run(StreamPumper.java:106)
at java.lang.Thread.run(Unknown Source)
I use the jshell library and this error occur when I want to use the stdout with RunWithOuputEvents
Thanks
Regards
I have this error when I start my jar, not in debug mode :
main._shserveur_stdout (java line: 958)
java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-5
at com.sun.javafx.tk.Toolkit.checkFxUserThread(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(Unknown Source)
at javafx.scene.Scene.addToDirtyList(Unknown Source)
at javafx.scene.Node.addToSceneDirtyList(Unknown Source)
at javafx.scene.Node.impl_markDirty(Unknown Source)
at javafx.scene.shape.Shape.impl_markDirty(Unknown Source)
at javafx.scene.Node.impl_geomChanged(Unknown Source)
at javafx.scene.text.Text.impl_geomChanged(Unknown Source)
at javafx.scene.text.Text.needsTextLayout(Unknown Source)
at javafx.scene.text.Text.needsFullTextLayout(Unknown Source)
at javafx.scene.text.Text.access$200(Unknown Source)
at javafx.scene.text.Text$2.invalidated(Unknown Source)
at javafx.beans.property.StringPropertyBase.markInvalid(Unknown Source)
at javafx.beans.property.StringPropertyBase.set(Unknown Source)
at javafx.beans.property.StringPropertyBase.set(Unknown Source)
at javafx.scene.text.Text.setText(Unknown Source)
at com.sun.javafx.scene.control.skin.TextAreaSkin.lambda$new$231(Unknown Source)
at com.sun.javafx.scene.control.skin.TextAreaSkin$$Lambda$143/345558392.invalidated(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.fireValueChangedEvent(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.markInvalid(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.invalidate(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.access$1300(Unknown Source)
at javafx.scene.control.TextInputControl.lambda$new$163(Unknown Source)
at javafx.scene.control.TextInputControl$$Lambda$74/566915750.invalidated(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(Unknown Source)
at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(Unknown Source)
at javafx.scene.control.TextArea$TextAreaContent.insert(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.doSet(Unknown Source)
at javafx.scene.control.TextInputControl$TextProperty.set(Unknown Source)
at javafx.scene.control.TextInputControl.setText(Unknown Source)
at anywheresoftware.b4j.objects.TextInputControlWrapper.setText(TextInputControlWrapper.java:44)
at b4j.example.main._shserveur_stdout(main.java:958)
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 anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4j.objects.Shell$EventOutput.write(Shell.java:158)
at org.apache.commons.exec.StreamPumper.run(StreamPumper.java:106)
at java.lang.Thread.run(Unknown Source)
I use the jshell library and this error occur when I want to use the stdout with RunWithOuputEvents
Thanks
Regards