B4J Question Need help for installing B4J application on Linux (ubuntu and Debian)

CR95

Active Member
Licensed User
In a closed thread, Nicolas Ciaramellano explained the process to install B4J application under Linux
You have to copy only the file .jar of the app you compiled under windows in a unix dir.
In the same dir you have to copy also the Java runtime FOR LINUX, you can find it here: https://b4xfiles-4c17.kxcdn.com/b4j/linux_jdk-11.0.1.zip
Each SO has the right Java runtime.
So, for example, you can create a dir under Linux (it's better if it is in your home dir) and copy inside of it:

B4JPackager11.jar ---> the tool that makes the build
jdk-11.0.1 ---> a dir containing the java runtime unzipped from linux_jdk-11.0.1.zip
packager.json ---> json file that contains some options (if you need it)
yourapp.jar ---> the .jar file of your application made from B4J
myicon.ico ---> the icon of your app (if you want to have one)

The file packager.json may be a text file more or less like this:

{
"IncludedModules": "javafx.web",
"IconFile": "myicon.ico",
"InputJar": "yourapp.jar"
}

Then, simply from linux you can send this command staying in the dir you created:

jdk-11.0.1/bin/java -jar B4JPackager11.jar packager.json

If all goes well you can find a new dir called temp inside the created dir and under the dir temp you can find another dir called build.
This dir (build) it's all you need to deploy the app.
So I copy in my Ubuntu directory :
1°) B4JPackager11.jar package (in a separate directory)
2°) jdk-11.0.1
3°) My B4JHowToJavaObject which was built by B4J in Objects directory after executing the "Build Stand Alone" command
4°) A JSON file with the command line : "InputJar": "B4JHowToJavaObject.jar"

In a terminal, I execute :
jdk-11.0.1/bin/java -jar B4JPackager11.jar packager.json

Result in an error message (translated from French) : impossible to run binary file : format error in exec

Capture d’écran de 2020-06-07 11-05-33.png


I made a second trial using "sudo". Result is as following

Capture d’écran de 2020-06-07 11-15-13.png


What is wrong ?
Thanks in advance
 

Attachments

  • Capture d’écran de 2020-06-07 09-27-44.png
    Capture d’écran de 2020-06-07 09-27-44.png
    43.2 KB · Views: 250

MicroDrie

Well-Known Member
Licensed User
Longtime User
Perhaps the file misses the right to be execute as a program? (right click on the file, properties and rights)
 
Upvote 0
Top