B4J Question [ABMaterial] run packaged app error

rbirago

Active Member
Licensed User
Longtime User
I have developed an ABM app that works fine both in debug and release mode.
At this point I have tried to build a packaged version, using the IDE's integrated function.
After this I have copied in the /temp/bin all the /objects files and folders (www, etc.).
Running the run_debug.bat it doesn't work. The log gives me this error:
packaged app err.png

any suggestion?
thanks
Roberto
 

rbirago

Active Member
Licensed User
Longtime User
If so, what can I do to run an ABM server app in production? only using IDE in release mode? I hope there is a better way...
 
Upvote 0

MichalK73

Well-Known Member
Licensed User
Longtime User
I just take Java in a zip from B4X. I unpack to disk and do .bat to start the .jar server.
 
Upvote 0

rbirago

Active Member
Licensed User
Longtime User
...but for what I know this is possible only using Java jdk 8. Using (as suggested) OpenJdk 11 the .jar is not runnable....or not? Really can I run the .jar in a OpenJdk environment?
 
Upvote 0

rbirago

Active Member
Licensed User
Longtime User
Once it was mandatory the use of Java Jdk. When more or less one year ago in the ide was integrated the packager it was necessary to use OpenJdk to generate a .exe (instead of Launch4j. But using this environment the .jar cannot be launched...or there is a trick to launch it?
 
Upvote 0

MichalK73

Well-Known Member
Licensed User
Longtime User
Ok I did a quick check.
Websocket does not work in the 'Build standalone Package'. You will not make an ABMaterial server into an 'exe'.
The only thing you have to do is to download from B4X Java11jdk or 14 in zip. Unzip it somewhere on your hard drive, then in another directory you upload your jar server in ABMaterial: jar, www, js,css,font and the necessary files as you had in the project.
Change start.bat for your project and run it. It works 100%.
You can remove all directory 'javafx' from JDK, it is not needed for server.

start.bat:
set JAVADIR="C:\b4x\jdk-14.0.1"
set JARFILE="c:\projekty\testy\ab3\B4J\Objects\ab3.jar"
set STARTDIR="c:\projekty\testy\ab3\B4J\Objects\"

cd %STARTDIR%
%JAVADIR%\bin\java.exe --module-path %JAVADIR%\javafx\lib  -jar %JARFILE%

PAUSE
 
Upvote 0

MichalK73

Well-Known Member
Licensed User
Longtime User
This only applies to UI apps ? You can run nonui apps with java -jar
Of course you can run no-ui applications, but the point is that B4J Packager builds the 'exe' application so that the websockets from ABMaterial do not work well.
 
Upvote 0
Top