B4J Tutorial B4LinuxInstall script to use B4X tools in linux

This is a Bash shell script that allows installing B4J and B4A in linux systems, along with their required dependencies. It is very functional. But for now only Ubuntu is fully supported.

The project has a repository in github. The only file you need is b4linuxinstall.sh. You can install it by opening a terminal and entering these commands:

B4X:
wget github.com/joseluis/B4LinuxInstall/raw/master/b4linuxinstall.sh
bash ./b4linuxinstall.sh
To install B4i and B4A you must download the installers and put them in the same directory before executing the script.
---

This is a work in progress. More linux distributions will also be supported eventually. There is a poll in this thread to know which are the most used in the community in order to prioritize them.

I must thank Zolive33 for his previous(1) work(2) from which B4LinuxInstall is built upon and tries to improve on the mission of bringing the software we love to our Linux computers.

UPDATE 2016: Since I'm no longer a user of B4X I'll probably wont be updating this tool anymore. Also it seems that since B4A version 5 there are some compatibility issues that difficults running it in linux.
 
Last edited:

barko

Member
Licensed User
Longtime User
Or you can use CrossOver on Deepin and you can install B4J/B4A without any problems. Deepin Linux 15 has CrossOver office preinstalled and it's free, no license needed.
 

Dragon68

Member
Licensed User
Longtime User
Or you can use CrossOver on Deepin and you can install B4J/B4A without any problems. Deepin Linux 15 has CrossOver office preinstalled and it's free, no license needed.
Never heard of CrossOver, but I've heard of CodeWeavers. Has anyone installed B4Av5 on CrossOver recently? Their own compatibility database shows B4A working on October 2012, not recent enough for B4Av5. Since CrossOver looks to be based on Wine I'm guessing you'd have the same issues as POL. I'd really like a better way, I may give it a try.
 

barko

Member
Licensed User
Longtime User
Seeing Is Believing. I use Deepin for a month now. And I use CrossOver for B4J. Installation was really easy. Install B4J, next thing was installation of .NET 4.0. Installation of the Java was little tricky, because java 8 installer has problems to start under wine, so I install it in virtualbox winxp and copy it out to CrossOver bottle. That's it. I believe you can install B4A too without big problems. :) Good luck.

https://www.codeweavers.com/products/crossover-linux
 

Dragon68

Member
Licensed User
Longtime User
Seeing Is Believing. I use Deepin for a month now. And I use CrossOver for B4J. Installation was really easy. Install B4J, next thing was installation of .NET 4.0. Installation of the Java was little tricky, because java 8 installer has problems to start under wine, so I install it in virtualbox winxp and copy it out to CrossOver bottle. That's it. I believe you can install B4A too without big problems. :) Good luck.

https://www.codeweavers.com/products/crossover-linux
Thanks Barko,
Can you do us all a favor and actually try getting B4A working on CrossOver. This means you need to install the Android SDK per my instructions above and then B4A itself. It would help greatly.

Secondly, I had problem as Java 8 just wouldn't install in Wine or PlayOnLinux, so if B4A stops running on Java 7 I won't be able to continue with B4A in future. Could you also post specific instructions on how you installed Java 8 in CrossOver.

When I see a commercial product that claims to do everything the open source version doesn't, I'm a bit skeptical, especially since both are based on Wine and CrossOver's own compatibility database shows an inability to install Java 8 or B4Av5 - officially at least. If there are too many workarounds just to get it working in CrossOver then what's the point of moving away from POL?
 

barko

Member
Licensed User
Longtime User
B4A-trial works on CrossOver. In short:

1) install b4a-trial - no problem
2) java is copy of java installed in winxp (i can install on winxp only this version jdk1.8.0_66)
3) install installer_r24.4.1-windows.exe - no problem
4) change original android.bat with yours (i changed just java path to jdk1.8.0_66)
5) install .net 4.0 - no problem

So I can run b4a-trial without any problem, I can connect to b4a-bridge on my device and I can run test app on my device and I can run android.bat to update android-sdk, no problems.

No need for aditional changes as you have described them on the PlayOnLinux.

My system is:

Deepin 15.1 64bit with preinstalled CrossOver version 14.1.11.

BTW: My purchased version B4A 4.30 is running in PlayOnLinux without problems.
 

Dragon68

Member
Licensed User
Longtime User
Thanks. Deepin is a Chinese based distro so I'm gonna give that a miss. I'm not sure how they managed to bundle a commercial product in their distro when nobody else has done it. I looked for another version of CrossOver but couldn't find any free out there, the commercial version is $40 per month! A bit too steep for a simple Wine wrapper and more than I'm willing to pay.

As I said earlier, if B4A makes Java 8 a pre-requisite then we won't be able to run it in Linux, have to use Virtual Box instead.
 

barko

Member
Licensed User
Longtime User
Deepin and Codeweavers are partners, so that's how they do this things. Chinese is DDE, other thins are debian. But, I'm not here to tell you what you need to do to run B4X on Linux. I'm just saying... :)
 
Last edited:

LWGShane

Well-Known Member
Licensed User
Longtime User

johnaaronrose

Active Member
Licensed User
Longtime User
Script no longer fully works. Small problem with Android SDK: it wanted to install API 26 but there was no SDK Platform 26. So I instead installed Android SDK 23 for which there was SDK Platform 23. After that finished, script did install of Java & B4A. However, launch of B4A gave .NET Framework Initialization Error as shown in attached file.Does script need amendment for this NET file? Also, where can I find this .NET file?

John
 

Attachments

  • B4A-DotNET Framework Error.png
    B4A-DotNET Framework Error.png
    18.6 KB · Views: 280

johnaaronrose

Active Member
Licensed User
Longtime User
Installed .NET 4.0 OK by changing script to dotnet4.0 from dotnet2.0 in winetricks section. However, when I run B4A on Ubuntu 16.04 it stops:
john@NewDesktop:~/.wine/drive_c/Program Files (x86)/Anywhere Software/Basic4android$ wine B4A.exe
The entry point method could not be loaded

Any ideas?
 

zolive33

Active Member
Licensed User
Longtime User
Hello John,

I use PlayOnLinux with Wine 2.0. For me, it works well.

I posted a tutorial :
Regards.
 

johnaaronrose

Active Member
Licensed User
Longtime User
@zolive33 I only want to use B4A. When I run winetricks, I get:
You are using a 64-bit WINEPREFIX. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
Is it necessary to install B4A with a 32-bit WINEPREFIX?
 

zolive33

Active Member
Licensed User
Longtime User
@zolive33 I only want to use B4A. When I run winetricks, I get:
You are using a 64-bit WINEPREFIX. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
Is it necessary to install B4A with a 32-bit WINEPREFIX?
Yes it's necessary to install B4A with a 32-bit WINEPREFIX.
 

johnaaronrose

Active Member
Licensed User
Longtime User
B4A is installed with a 32-bit prefix. I forgot that WINEPREFIX="/home/john/workspace_b4/wine_b4" and that has WINEARCH=win32. I tried manually starting B4A:
john@NewDesktop:~$ WINEPREFIX="/home/john/workspace_b4/wine_b4"
john@NewDesktop:~$ wine '/home/john/workspace_b4/wine_b4/dosdevices/c:/Program Files/Anywhere Software/Basic4android/b4a.exe'
fixme:storage:create_storagefile Storage share mode not implemented.
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
err:mscoree:LoadLibraryShim error reading registry key for installroot
fixme:storage:create_storagefile Storage share mode not implemented.
err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
fixme:iphlpapi:NotifyAddrChange (Handle 0x114e368, overlapped 0x114e380): stub
fixme:storage:create_storagefile Storage share mode not implemented.
err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.
fixme:iphlpapi:NotifyAddrChange (Handle 0x10fe8a0, overlapped 0x10fe8ac): stub
wine: configuration in '/home/john/.wine' has been updated.
The entry point method could not be loaded

Any ideas?
 

zolive33

Active Member
Licensed User
Longtime User
excues me ,which version of b4j are you installed?I've followed the video,b4j installed ok,but can not run,after the startup picture shows the application has no more UI shows(with b4j 4.2)

e

I recently install B4J 4.7 and it works fine! This tutorial was made under Ubuntu 12.4. I think it does not work for Ubuntu 16.4.
 

icefairy333

Active Member
Licensed User
Longtime User
installed b4j4.7 on macos 10.12.2(with crossover 16),run it got error(with uxtheme, as attach image),more error as playonmac (4.2.10+buildin wine1.8);

and after put uxtheme.dll(from win7 64bit) in b4j install directory the b4j start with no error,but show a black window only has no menu or anything.
 

Attachments

  • 1111.png
    1111.png
    368.9 KB · Views: 276
Top