I am trying to realize what is said in the title. The code in B4J is as follows:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
I get an error on bitmap.initialize. The message starts with:
Error occurred on line: 322 (Main) 'which is bitmap.Initialize
java.lang.RuntimeException: java.lang.NoClassDefFoundError: javafx/scene/image/Image
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90)
at anywheresoftware.b4a.BA$3.run(BA.java:178)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.ShellBA.startMessageLoop(ShellBA.java:111)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:131)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:300)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:158)
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.jav
a:93)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.main(main.java:29)
Caused by: java.lang.NoClassDefFoundError: javafx/scene/image/Image
at anywheresoftware.b4j.objects.ImageViewWrapper$ImageWrapper.Initialize2(ImageViewWrapper.java:125)
at anywheresoftware.b4j.objects.ImageViewWrapper$ImageWrapper.Initialize(ImageViewWrapper.java:118)
at b4j.example.main._sendfile(main.java:545)
at b4j.example.main._webcam_processcompleted(main.java:991)
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) a.s.o
What am I doing wrong?
The code in b4A is:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Perhaps somebody can check this code as well ; it may prevent another thread.
Regards
Harry
			
			
			
				B4X:
			
		
		
		Dim bitmap As Image
    If File.Exists("/home/pi/MyApps/Domo/Images","Webcam" & ImageNr & ".jpg")  Then
        bitmap.Initialize("/home/pi/MyApps/Domo/Images","Webcam" & ImageNr & ".jpg")
        Dim dataToSend() As Byte = ser.ConvertObjectToBytes(CreateMap("FileName": "Webcam", "Data": bitmap))
        Stream3.Write(dataToSend)
    Else
        Stream2.Write("-4"& CRLF)
    End IfI get an error on bitmap.initialize. The message starts with:
Error occurred on line: 322 (Main) 'which is bitmap.Initialize
java.lang.RuntimeException: java.lang.NoClassDefFoundError: javafx/scene/image/Image
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:114)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90)
at anywheresoftware.b4a.BA$3.run(BA.java:178)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.ShellBA.startMessageLoop(ShellBA.java:111)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:131)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:300)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:158)
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.jav
a:93)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:90)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.main(main.java:29)
Caused by: java.lang.NoClassDefFoundError: javafx/scene/image/Image
at anywheresoftware.b4j.objects.ImageViewWrapper$ImageWrapper.Initialize2(ImageViewWrapper.java:125)
at anywheresoftware.b4j.objects.ImageViewWrapper$ImageWrapper.Initialize(ImageViewWrapper.java:118)
at b4j.example.main._sendfile(main.java:545)
at b4j.example.main._webcam_processcompleted(main.java:991)
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) a.s.o
What am I doing wrong?
The code in b4A is:
			
				B4X:
			
		
		
		Sub Stream3_NewData(data() As Byte)
    Dim image() As Byte= ser.ConvertBytesToObject(data)
    'convert the array of bytes to image
    Dim in As InputStream
    in.InitializeFromBytesArray(image, 0,image.length)   
    bmpPhoto.Initialize2(in)    'bmpPhoto is an activity global
    'draw the image
    StartActivity(Webcam)   ín this activity the bitmap is drawn
End SubPerhaps somebody can check this code as well ; it may prevent another thread.
Regards
Harry
 
				 
 
		 
 
		