B4J Question Can i use Canvas in a nonui app (server app)?

DonManfred

Expert
Licensed User
Longtime User
as the title say i am asking about whether i can use a Canvas to draw some values on it (Text, small Images), at the end i would like to save the canvas to an image (jpg, png) which the server app then sends to an Discord Channel.

I know how to write an UI App.

Or let me ask it another way. Can i create a UI app (and not show any Form) and run this jar on a Ubuntu VPS?

Never needed to write a server app but this time i need to ;-)

Any starting tips are highly welcome regarding whether it is possible in a B4J non_ui app.
a Code snippet (or link to) is welcome too
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
However a server app (based on jServer) should be a real non-ui app.
I should follow this then. Let the Server be a nonui app.
And when i need to create a Image i´ll build something using jshell to start a app (UI App not showing a form), let the app create the image i need.


The non-ui Server app (running on my PC as of now) works fine so far (not using any Images). The output is sending "CodeLines" as they have a fixed font.
orcbot007.png
 
Upvote 0

Harris

Expert
Licensed User
Longtime User
Yes. You can create a UI app and don't show the main form.

That's what I do for my Shift Report, in an ABM server setup. This report jar is always running.
This app looks at a table for new data - every 30 seconds.
When it finds a new record, it creates 3 bitmaps (bar graphs) and includes these in a NextReport - which is then directed to a network printer...

1588519089825.png



Thanks
 
Upvote 0
Top