B4J Question [ABMaterial] Problem deploying to a Raspberry Pi

janderkan

Well-Known Member
Licensed User
Longtime User
I have OpenJDK11 on my PC and on the first deployment i got an error that my jar was built to a newer version.

Then I followed instructions in this link and installed bellsoft jdk11 on the Pi
ABMaterial did not run and the errors was
B4X:
/js/core.4.30.min.js
Not Found
/js/sessioncreator.js
Not Found
/css/materialize.4.26.min.css
Not Found
/favicon.ico
Not Found

I started all over with a new SD card and installed openjdk-9 using this command:
B4X:
apt-get install openjdk-9-jdk-headless
Everything works fine. :)

To be sure I started all over with a new SD card and installed bellsoft jdk12 on the Pi
Exactly the same error again. :(
 

OliverA

Expert
Licensed User
Longtime User
Since you only need the server version of the JDK, why did you not try
B4X:
apt-get install openjdk-11-jdk-headless
? With the new Raspian version that !should! install version 11 of the JDK
 
Upvote 0

janderkan

Well-Known Member
Licensed User
Longtime User
Update:
I have written all down so I can try again and again, each time with a fresh SD card.
Up til now I have made it work 2 times with:
B4X:
apt-get install openjdk-9-jdk-headless
and Never with:
B4X:
apt-get install openjdk-10-jdk-headless
or
B4X:
apt-get install openjdk-11-jdk-headless

I use the same objects folder every time.

My installation is DietPi and now I will try NOOBS before i go to bed :(
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
It's should actually be
B4X:
apt-get install openjdk-11-jre-headless
You don't need JDK to run ABMaterial. This will also set up your Pi to run the java command. So after install (if successful), try
B4X:
java -version
and you should get 11.0.4 something. Please note that I'm sort of guessing that this will work on you Pi. As to the missing files, it looks like the .jar is not in the right location, not everything is copied over. Is ABM 4.3 the current public release? The donator's release is 4.51
 
Upvote 0

janderkan

Well-Known Member
Licensed User
Longtime User
It's should actually be
B4X:
apt-get install openjdk-11-jre-headless
You don't need JDK to run ABMaterial. This will also set up your Pi to run the java command. So after install (if successful), try
B4X:
java -version
and you should get 11.0.4 something. Please note that I'm sort of guessing that this will work on you Pi. As to the missing files, it looks like the .jar is not in the right location, not everything is copied over. Is ABM 4.3 the current public release? The donator's release is 4.51

Thank you for your input, I will continue :)
The files are not missing and I got it to work 2 times.

What came first, the hen or the egg ? I will donate when I know it works :)
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Looks like my signature is doing me proud on this one. If you have a Pi 4, my advise would apply. For any Pi's before that, you'll need the 32 bit version. If you use the official Raspbian, then you should download the .deb packages and install them. This way it may set up everything as needed (the Debian way).

32 bit versions:
https://bell-sw.com/pages/java-11.0.4/
Install instructions for .deb for above: http://hirt.se/blog/?p=1116

Update: Change the wget and other commands given in the above link to use the new 11.0.4 update of the JDK

https://www.azul.com/downloads/zulu-community/
.tar.gz, so install more manual (like in @Erel's example).
 
Upvote 0

janderkan

Well-Known Member
Licensed User
Longtime User
Now I have tried Raspbian Buster Lite and OpenJdk11.0.4 32 bit, this is the output of java -version:
openjdk version "11.0.4-BellSoft" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4-BellSoft+10)
OpenJDK 32-Bit Server VM (build 11.0.4-BellSoft+10, mixed mode)

and this is the output when I start lesson2 from ABM for Dummies:
/js/core.4.30.min.js
/js/sessioncreator.js
Not Found
/css/materialize.4.26.min.css
Not Found
Not Found
/favicon.ico
Not Found

I get the 3 circular lines and nothing more.
I works when I start it on my PC
The files 'missing' are present on the PI
 
Upvote 0

janderkan

Well-Known Member
Licensed User
Longtime User
Now I tried with the Demo project included in the 4.30 package.
Runs fine in debug and release on PC
On Pi I only gets the PC/Tablet/Phone animation.
BUT, there are no errors in the Putty window.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
I can get my hands on a Pi 3 tomorrow. I'll try to reproduce your issue(s) then and report back.
 
Upvote 0

janderkan

Well-Known Member
Licensed User
Longtime User
Now it is working, both on my TinkerBoard and my Pi3

I have been using 2 pcs. 32Gb and 1 pcs, 8Gb SD cards.
Looks like the problem are the 32 Gb card, even everybody writes that there is no limit to the size.
I go to bed and continue tomorrow :)
 
Upvote 0

janderkan

Well-Known Member
Licensed User
Longtime User
I was tired yesterday, and today I cannot prove that the size of the SD cards means anything.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
I was tired yesterday, and today I cannot prove that the size of the SD cards means anything.
So now everything working on both the 8GB and the 32GB cards?
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
We deploy on many different sizes (sometimes needed because if you take an image of let's say a 8GB SD card, it doesn't fit on another 8GB card so we have to take the next bigger size like 16GB, 32GB, 64GB etc).

ABM runs fine using Java v9+, but we do also use OpenJDK 11 on some other vps's (debian based). Never tried OpenJDK 11 on raspberry pi, but it should make any difference.
 
Upvote 0

janderkan

Well-Known Member
Licensed User
Longtime User
I am a beginner, and I have not figured out what went wrong.
Router, case sensitive filenames, etc.
But now it all works and I can reproduce it again and again :)
I have published the document I made to help other beginners.
Please tell me if something I did is stupid, bad practice and so on.
Find it here.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Can this be one of the "classical" situations where the "www" folder has not been updated/copied to the pi???
 
Upvote 0
Top