B4J Question b4j and raspberry pi 2

kalarius

Active Member
Licensed User
Longtime User
I try to run my program at raspberry pi 2 (the program run on windows 10 and b4j with java8)
but I got a lot of error messages at log field

even if I try to run this
ub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
End Sub

java.lang.reflect.InvocationTargetException
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:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.NullPointerException
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:362)
.....
......
......
and more error

my configure path is
C:\Program Files\Java\jdk1.7.0_79\bin\javac.exe
and I have install the raspberry as earl describe at an other topic

what is going wrong ?

thank
 

kalarius

Active Member
Licensed User
Longtime User
Installing Oracle JDK 8 on Raspberry Pi
Posted by Rahul Kar × 8:16 PM


This post will show how to download and set up Oracle JDK 8 on Raspberry Pi.

Visithttp://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html, click the download button of Java Platform (JDK) 8. Click to Accept License Agreement, download jdk-8-linux-arm-vfp-hflt.tar.gz for Linux ARM v6/v7 Hard Float ABI.


Log-in Raspberry Pi, enter the command to extract jdk-8-linux-arm-vfp-hflt.tar.gz to /opt directory.
$ sudo tar zxvf jdk-8-linux-arm-vfp-hflt.tar.gz -C /opt

Set default java and javac to the new installed jdk8.
$ sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0/bin/java 1

$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java

After all, verify with the commands with -verion option.
$ java -version
$ javac -version


I install as describe above
now the compiler does not show any error but at the TV I do not see my application
The bridge refer that is connect
but how can I run the allplication on the raspberry?
 
Upvote 0

kalarius

Active Member
Licensed User
Longtime User
yes But I want to show a video on the screen

since now I have download and install the ver 8u65 but it has not include the javaFX I found a addin for java ver 8u40 and I can run a simple form But I can not run the program with MP.Initialize("mp",File.geturi("/home/pi","nba.mp4"))
it says that have problem with thae stack and thw VM try to fix it.
so now I try to find the java version 8u40 for the arms

do you know from where I can down load it because at the oracle archive at the 8u40 jdk does not have something for arms
 
Upvote 0

kalarius

Active Member
Licensed User
Longtime User
looking to solve the problem with javafx at the internet I found the arm6hf-sdk, anf following the instractions I manage to have run a simple program with a form but That i want is to paly a video on the screen Just one mp4 file The same again and again

With this program i read the follow message

Java HotSpot(TM) Client VM warning: You have loaded library /opt/jdk1.8.0_65/jre/lib/arm/libjfxmedia.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

this is the error message after I try to run the program the file libjfxmedia.so there is into the arm directory
but i do not know what the message wants to do
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
It seems to be related to the VM machine you're working on and to the RasPi... Have tried a "normal" windows machine?
 
Upvote 0
Top