In a closed thread, Nicolas Ciaramellano explained the process to install B4J application under Linux
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
I made a second trial using "sudo". Result is as following
What is wrong ?
Thanks in advance
So I copy in my Ubuntu directory :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.
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
I made a second trial using "sudo". Result is as following
What is wrong ?
Thanks in advance