B4J Question Raspberry Pi with Java 11 not working for me

Toley

Active Member
Licensed User
Longtime User
I follow this tutorial https://www.b4x.com/android/forum/threads/raspberry-pi-with-java-11.99606/ on a Rpi 3+ and I get this error message:

WARNING: Unknown module: javafx.swing specified to --add-opens
WARNING: Unknown module: javafx.swing specified to --add-opens
WARNING: Unknown module: javafx.swing specified to --add-opens
WARNING: package com.sun.glass.ui.win not in javafx.graphics
WARNING: package com.sun.prism.d3d not in javafx.graphics
WARNING: Unknown module: javafx.swt specified to --add-opens
WARNING: Unknown module: javafx.swing specified to --add-opens
Waiting for debugger to connect...
Program started.
glGetError 0x505
Program link log:
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javafx.graphics/com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFactory.java:312)
at javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:256)
at javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:477)
at javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.fillPrimRect(BaseShaderGraphics.java:1003)
at javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(BaseShaderGraphics.java:1502)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectanglesDirectly(NGRegion.java:1110)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectangle(NGRegion.java:832)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderAsRectangle(NGRegion.java:753)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:574)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:578)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:479)
at javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:328)
at javafx.graphics/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:91)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Error creating shader program
at javafx.graphics/com.sun.prism.es2.ES2Shader.createFromSource(ES2Shader.java:158)
at javafx.graphics/com.sun.prism.es2.ES2Shader.createFromSource(ES2Shader.java:173)
at javafx.graphics/com.sun.prism.es2.ES2ResourceFactory.createShader(ES2ResourceFactory.java:224)
at javafx.graphics/com.sun.prism.shader.AlphaTexture_LinearGradient_Loader.loadShader(AlphaTexture_LinearGradient_Loader.java:52)
... 29 more
java.lang.InternalError: Error loading stock shader AlphaTexture_LinearGradient
at javafx.graphics/com.sun.prism.es2.ES2ResourceFactory.createStockShader(ES2ResourceFactory.java:315)
at javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.getPaintShader(BaseShaderContext.java:256)
at javafx.graphics/com.sun.prism.impl.ps.BaseShaderContext.validatePaintOp(BaseShaderContext.java:477)
at javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.fillPrimRect(BaseShaderGraphics.java:1003)
at javafx.graphics/com.sun.prism.impl.ps.BaseShaderGraphics.fillRect(BaseShaderGraphics.java:1502)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectanglesDirectly(NGRegion.java:1110)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderBackgroundRectangle(NGRegion.java:832)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderAsRectangle(NGRegion.java:753)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:574)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:270)
at javafx.graphics/com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:578)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2072)
at javafx.graphics/com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1964)
at javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:479)
at javafx.graphics/com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:328)
at javafx.graphics/com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:91)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at javafx.graphics/com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
at java.base/java.lang.Thread.run(Thread.java:834)
Program link log:
 

Toley

Active Member
Licensed User
Longtime User
Thank you for your answer Erel, Effectively a blank UI program do not throw the error. I am also able to create a layout and it shows, but as soon as I add a button I have the error. I did not test all the views but I know a label works but a button crash.

I also have another question, is it normal I cannot see the program running in a VNC viewer I can only see it on an HDMI display.
 
Upvote 0

Toley

Active Member
Licensed User
Longtime User
Thank you Erel, it works. In fact I raised GPU memory to 196 in the configuration tool.
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
Thank you Erel, it works. In fact I raised GPU memory to 196 in the configuration tool.

I had to raise it to the max. Runs "ok" (as expected not that fast). Non-UI apps run like hell. I have a server app on my CentOS VPS (the cheap plan with 512MB RAM only) and I can create and insert 1500 invoices to a MySQL db in 3-5 secs :cool::D
 
Upvote 0
Top