B4J Question Location of jar on Raspberry Pi deployed from B4J-Bridge

bdunkleysmith

Active Member
Licensed User
Longtime User
I've produced quite a few UI apps using B4J for use on Windows and used Arduino boards to collect data which feed some of these apps via USB, but I'm a newbie to the Raspberry Pi world.

I'm exploring use of the Raspberry Pi as the inbuilt wireless appears a simpler approach than adding wireless boards to my existing Arduino hardware.

So I'm just doing some testing and appear to have successfully run my B4J code on the Raspberry Pi utilising B4J-Bridge, but while I saw Erel said in one of the Forum posts "Note that the jar is copied to the target machine and deployed under a folder named tempjars." my jar doesn't appear to be there. The only file in the tempjars folder is AsyncInput2.

Can anyone suggest why my jar isn't there or where it may be?

I've also read while trying to come up to speed that B4J UI apps cannot be run on the Raspberry Pi. Is this true?
 

bdunkleysmith

Active Member
Licensed User
Longtime User
Thanks jmon for your input on both queries. I installed the Gluon JavaFX Embedded SDK as per the link you provided, but while one of my UI apps I chose as an example appeared, it's not functioning correctly and so some more homework to be done.
 
Upvote 0

bdunkleysmith

Active Member
Licensed User
Longtime User
I can run a jar file which I have used successfully on a Windows PC, but while the UI appears, I cannot interact with it via the mouse.

B4X:
pi@raspberrypi:~/tempjars $ java -jar result.jar
Udev: Failed to write to /sys/class/input/mice/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/input1/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/event1/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/mouse0/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/input2/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/event2/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/input0/uevent
      Check that you have permission to access input devices
Udev: Failed to write to /sys/class/input/event0/uevent
      Check that you have permission to access input devices
Cannot open display
1.8.0_152
Client Address: 127.0.1.1
Port=3662
Cannot create resource
java.nio.BufferOverflowException
    at java.nio.DirectIntBufferU.put(DirectIntBufferU.java:363)
    at com.sun.javafx.tk.quantum.UploadingPainter.run(UploadingPainter.java:153)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
    at java.lang.Thread.run(Thread.java:748)
java.nio.BufferOverflowException
    at java.nio.DirectIntBufferU.put(DirectIntBufferU.java:363)
    at com.sun.javafx.tk.quantum.UploadingPainter.run(UploadingPainter.java:153)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)

The part:
B4X:
1.8.0_152
Client Address: 127.0.1.1
Port=3662
is log output from my app.

I tried running the jar as SU, ie. sudo java -jar result.jar, but that also threw an error.

As I said I'm new to Raspberry Pi, although it is taking me back to my very early Unix days and so I'll just keep investigating. I might create a very simple B4J UI project and work my way up from there.
 
Upvote 0
Top