B4J Question B4J IDE runs on Linux :)

Squiffy

Active Member
Licensed User
I don't know if this is old news to people here, but the B4J IDE (including the designer) runs on Ubuntu 20.4 with the latest Crossover (V20).

Crossover even has B4J as a known app, so the install is relatively painless.

But - and there's always a but - when I try to run a simple program B4J complains "Robocopy.exe" is missing.

I'm googling it all, but whilst I am has anyone else solved this?

So, so close ... :)
 

Erel

Administrator
Staff member
Licensed User
Good news!
But - and there's always a but - when I try to run a simple program B4J complains "Robocopy.exe" is missing.
This one is very simple.

Delete the selected line:
1602659053029.png


It means that automatic synchronization of files from the shared files folder will not work. Not a big deal.
 
Upvote 0

Squiffy

Active Member
Licensed User
Good news!

This one is very simple.
...

Thank you, that worked.

Next error :

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

Assume this is a Java thing. Is that a setting in B4J or something I need to address with the Java installation?

I have that sinking feeling i might have spoken too soon ...
 
Upvote 0

Squiffy

Active Member
Licensed User
Close the IDE. Find the ini file (on Windows it is: C:\Users\<user>\AppData\Roaming\Anywhere Software\B4J and set MaxRamForDex to 1024.

Blow me down with a feather. It works!

This has made my morning :)

I'm sure there'll be snags a long the way, but until then, happy days.
 
Upvote 0

udg

Expert
Licensed User
It means that automatic synchronization of files from the shared files folder will not work
Could robocopy be substituted by a properly written shell script? I mean, if the IDE instead of calling robocopy launches a script that does exactly the same smart moves of it, doesn't it solve the problem? BTW, it could be a script or any other executable code..
 
Upvote 0

Erel

Administrator
Staff member
Licensed User
Could robocopy be substituted by a properly written shell script? I mean, if the IDE instead of calling robocopy launches a script that does exactly the same smart moves of it, doesn't it solve the problem? BTW, it could be a script or any other executable code..
It can be substituted with many simple things, however as we are talking about B4J here then this feature is not needed anyway. Once we see that it actually works we can pay attention to the smaller details.
 
Upvote 0

Jim Brown

Active Member
Licensed User
I would be interested in trying to get B4X working under Linux too.
I tried using PlayOnLinux to install B4J but get this log: "err:mscoree:CLRRuntimeInfo_GetRuntimeHost Wine Mono is not installed"
The above is when installed as a 64 bit application.
When installing as 32 bit and launching I just see "Error in main. B4J crashed."
 
Last edited:
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
PlayOnLinux works with recipes to make the apps work. if someone hasnt found the right recipe it will try something generic and most likely fail, i used playonlinux with witcher 3 that of course run flawlessly

Crossover uses the same approach but it has better settings to find the right recipe. theoretically you could do it to with vanilla wine but it could take several trials
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
i was able to make the installation with the following preps:

Crossover
win7 32 bits
netframework 2.0
netframework 2.0 sp2
netframework 4.0
netframework 4.6.2
b4j

without 4.6.2 the ide opened but as a black screen, theoretically because of the wpf parts.

i will anotate my findings here as i make progress
 
Upvote 0

EnriqueGonzalez

Well-Known Member
Licensed User
Next is the JDK choosing, we cant use JDK 11 because it is 64 bits and the bottle is 32 bits. (the reason i used 32 bits it was because Crossover sugested me that 64 bits were incompatible, i will try to do it after this test.)

So, Crossover actually recomends:
java with zulu jdk 8 i586

Close the IDE. Find the ini file (on Windows it is: C:\Users\<user>\AppData\Roaming\Anywhere Software\B4J and set MaxRamForDex to 1024.
this was found in:
home/<user>/.cxoffice/<bottlename>/dosdevices/c:/users/crossover/Application Data/Anywhere Software/B4J

i was able to compile a server app and a UI app without issue.
 
Upvote 0
Top