pevguitars Member Licensed User Longtime User Mar 29, 2016 #1 I am attempting to save an image using the image.writetostream. In the B4J Win debugger it works but when run in Raspberry Pi 3 it throws the following errors:- Code: Copy main._mprint (java line: 1205) java.lang.NoClassDefFoundError: javafx/embed/swing/SwingFXUtils at anywheresoftware.b4j.objects.ImageViewWrapper$ImageWrapper.WriteToStream(ImageViewWrapper.java:177) at b4j.example.main._mprint(main.java:1205) at b4j.example.main._mm_action(main.java:1089) 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:497) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93) at anywheresoftware.b4a.BA$2.run(BA.java:165) at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294) at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92) at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableP rocessor.java:51) at java.lang.Thread.run(Thread.java:745) etc ... 15 more Here is the code I am using Code: Copy Dim Bitmap1 As Image Dim out As OutputStream Bitmap1 = Ctx.Snapshot out = File.OpenOutput(File.DirApp,"test.png",False) Bitmap1.WriteToStream(out) out.Close Any help greatly appreciated. Peter V
I am attempting to save an image using the image.writetostream. In the B4J Win debugger it works but when run in Raspberry Pi 3 it throws the following errors:- Code: Copy main._mprint (java line: 1205) java.lang.NoClassDefFoundError: javafx/embed/swing/SwingFXUtils at anywheresoftware.b4j.objects.ImageViewWrapper$ImageWrapper.WriteToStream(ImageViewWrapper.java:177) at b4j.example.main._mprint(main.java:1205) at b4j.example.main._mm_action(main.java:1089) 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:497) at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93) at anywheresoftware.b4a.BA$2.run(BA.java:165) at com.sun.javafx.application.PlatformImpl.lambda$null$170(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(PlatformImpl.java:294) at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:92) at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableP rocessor.java:51) at java.lang.Thread.run(Thread.java:745) etc ... 15 more Here is the code I am using Code: Copy Dim Bitmap1 As Image Dim out As OutputStream Bitmap1 = Ctx.Snapshot out = File.OpenOutput(File.DirApp,"test.png",False) Bitmap1.WriteToStream(out) out.Close Any help greatly appreciated. Peter V
Erel B4X founder Staff member Licensed User Longtime User Mar 29, 2016 #2 The error means that the class required for this method is not available. Upvote 0
pevguitars Member Licensed User Longtime User Mar 29, 2016 #3 Yes thank you Erel, I thought that may be the case.. Is there possible alternative coding? I have updated Debian, and have the Javafx as recommended. Peter V Upvote 0
Yes thank you Erel, I thought that may be the case.. Is there possible alternative coding? I have updated Debian, and have the Javafx as recommended. Peter V
Erel B4X founder Staff member Licensed User Longtime User Mar 29, 2016 #4 I don't think that you will be able to save the JavaFX image. What do you need it for? Maybe there is a different way to implement it. Upvote 0
I don't think that you will be able to save the JavaFX image. What do you need it for? Maybe there is a different way to implement it.
pevguitars Member Licensed User Longtime User Mar 29, 2016 #5 Thank you Erel. I am attempting to find a way to print images from the Pi 3 captured from a canvas by snapshot. I have loaded cups and my printer is recognised. It prints text files; so far unable to print images from my b4j apps. I have tried jFX8Print library and that also complains about missing classes. I beginning to suspect that the Pi 3 is unable to support some of these processes without major OS additions. I have been converting some of my B4A guitar making tools to B4J Raspberry Pi 3 with surprising success; this printing issue is the only part not working.. Upvote 0
Thank you Erel. I am attempting to find a way to print images from the Pi 3 captured from a canvas by snapshot. I have loaded cups and my printer is recognised. It prints text files; so far unable to print images from my b4j apps. I have tried jFX8Print library and that also complains about missing classes. I beginning to suspect that the Pi 3 is unable to support some of these processes without major OS additions. I have been converting some of my B4A guitar making tools to B4J Raspberry Pi 3 with surprising success; this printing issue is the only part not working..
Erel B4X founder Staff member Licensed User Longtime User Mar 30, 2016 #6 Are you using OpenJFX: https://wiki.openjdk.java.net/display/OpenJFX/OpenJFX+on+the+Raspberry+Pi ? Upvote 0
pevguitars Member Licensed User Longtime User Mar 30, 2016 #7 No. I am using the scheme suggested elsewhere in this forum. Has SDK 8.0_73 and arm package. For me everything works except image saving by writetostream.. I have looked at page suggested and I will try to make an installation on another sd card.. Thank you again for your help. Upvote 0
No. I am using the scheme suggested elsewhere in this forum. Has SDK 8.0_73 and arm package. For me everything works except image saving by writetostream.. I have looked at page suggested and I will try to make an installation on another sd card.. Thank you again for your help.