B4X on Linux

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello,
After a long time trying, I was able to make B4J 4.50 run on Linux Mint 18 - MATE using Crossover (for easyness because of the many trials done).

All of the software is running fine (even the Internal Designer). The sole thing I can not get is executing the compiled Jar directly from the Wine's environement because of a weird error about JavaFX :
B4X:
Device "Intel(R) G45/G43" (\\.\DISPLAY1) initialization failed :
WARNING: bad driver version detected, device disabled. Please update your driver to at least version 6.14.10.5303
main._process_globals (java line: 73)
java.lang.NoClassDefFoundError: javafx/scene/control/Dialog
   at b4j.example.main._process_globals(main.java:73)
   at b4j.example.main.initializeProcessGlobals(main.java:64)
   at b4j.example.main.start(main.java:33)
   at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:319)
   at com.sun.javafx.application.PlatformImpl$5.run(PlatformImpl.java:219)
   at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:182)
   at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
   at java.security.AccessController.doPrivileged(Native Method)
   at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:179)
   at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:76)
   at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
   at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:17)
   at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:67)
   at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: javafx.scene.control.Dialog
   at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
   ... 14 more

But the jar for a non UI app is correctly generated and usable without any problem. I will have to investigate more to fix the JavaFX before trying installing B4A.

I have set it like this :
  • Win XP bottle
  • Mono installed
  • .Net framework 4.0 and 4.0 extended
  • .Net framework 2.0
  • Direct X9 (without it I couldn't open the Designer)
  • jdk-7u79-windows-i586 (64 bits version or more recent wouldn't install)

 

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello,
Yes I did but I only got the B4J logo to display. After that, it crashed with a lot of errors in the logs, of course. I think the guy doing the demo was using a previous version of the IDE. But thanks for the tip
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
HI!

may be you can trick B4J on launching the program on Linux with B4J Bridge...

39 Dollars for crossover, may be i could try it if i see more success stories, because with playonlinux it was a massive dissapointment.
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
Thanks for that information, Erel. The JavaFX is now almost fixed after having installed the most recent JDK using a procedure described here.

I will have to tweak the display a little but for now, the form do appear



@Enrique Gonzalez R : I only used Crossover because I had a lot of trials to do. But what Crossover does, Wine (free of charge one) is able to do too because the first is only a frontend to the second one


Edit : display fixed by simply removing OpenJDK from the Linux install and installing Oracle JDK manually. Now the button's text is displayed correctly when the JAR is executed (but still not in the WYSIWYG Designer - btw it is not critical)
 
Last edited:

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
Thanks for the information!

I will keep trying to install B4J on linux, i am still learning all the ubuntu stuff.
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
Hello!

I successfully installed B4J on Ubuntu using CrossOver! so beautiful!

I also installed java jdk 1.8.101 for windows in the wine enviroment but it always launched a black window for UI apps (even for the designer), so i used the B4J-bridge and it actually uses the Open JDK of the Ubuntu platform to compile and therefore it worked flawlessly.

Thanks lemon for the required steps!
 

corwin42

Expert
Licensed User
Longtime User
Anyone tried to install B4A with this method? My attempts some time ago were not successful.

I completely move over to an ArchLinux installation now on my private computer. Used LinuxMint at first but I'm somewhat an update junkie and I ended up with a large amount of additional installation resources to get more recent software packages. This is much more comfortable with ArchLinux since you have always an up to date system with up to date additional software (though this may be dangerous sometimes).

I have a VirtualBox Win10 VM only for my online banking software and the B4X products. Getting the B4X tools work under Linux would be absolutely great for me.
 

corwin42

Expert
Licensed User
Longtime User
I just got my first App compiled with B4A 6.30 running on Linux/Wine. Even better B4A was able to deploy the app to a Genymotion virtual device running directly on linux.

One problem I still have is that the windows SDK Manager is not running under wine. I have copied my SDK installation from my windows VM. I guess this issue will be possible to fix, too.
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello,
I am having bad time trying to install the Android SDK inside a bottle. There is always a point to fix. But still trying.
@corwin42 : do you have any tip about ? No special problem met ? Many thanks
 

Squiffy

Active Member
Licensed User
Longtime User
Ok, first my set up. Running Qubes and installing B4J using Crossover on a Debian 8 VM. What could possibly go wrong?

Following lemonisdead's checklist it almost works - the editor loads and I can type a bit, but the second I resize the bounding window it locks solid & I need to quit crossover. I have to resize as it starts up in too small a window.

EDIT - CORRECTION
It locks up if you *maximize* the window. Resizing by dragging the corner seems to be ok, at least so far. Any ideas why that would be?

I fired up crossover using a terminal, just to watch the output :

B4J version: 4.70
.Net version: 4.0.30319.1
Ini folder: C:\users\crossover\Application Data\Anywhere Software\B4J
Gui: 1016
B4XClassifer created
B4XErrorTagger created
Failed to get scroller
Failed to get scroller
Gui: 1000
Failed to get scroller
Gui: 1000
Gui: 1000
*** no reuse ***
Failed to get scroller
Gui: 169
Gui: 100
...
endless Gui: <some number> scrolling up the screen.
 
Last edited:

Squiffy

Active Member
Licensed User
Longtime User
Ok, clicking the designer. I get a small pop up windows saying Java error, a big pop up window which is blank with the heading "ActiProWindowChromeShadow" and the designer which seems to work fine.

The terminal window (from where i started crossover) is now endlessly scrolling up the screen with :

Trying to connect to port: 25125
Trying to connect to port: 25008
Trying to connect to port: 25125
Trying to connect to port: 25008
Trying to connect to port: 25125
Trying to connect to port: 25008
Trying to connect to port: 25125
...
 

Squiffy

Active Member
Licensed User
Longtime User
Hmm, way to go yet I think. Keeps locking up when typing. My excitement being a little premature...
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello @Squiffy,
I will reply shortly because on the road. I can see two problems here : one is about the windows and typing. For this one I would try installing the X11 Mac (and Linux) drivers provided by Crossover and / or disabling the 3D acceleration by right clicking the bottle.

For the other problem, the connection issue, I have no idea for the moment.
 

Squiffy

Active Member
Licensed User
Longtime User
Installing the Mac x11 driver seems to have cured the window maximize issue. And so far typing hasn't killed it yet.

Fingers crossed.... thanks!

EDIT -
spoke too soon. Switching between normal & maximum a couple of times did kill it. Seems to survive one cycle of maximize/restore then locks solid again. Which is a marginal improvement on before when it wouldn't even do one.

EDIT 2 -
actually, it's completely hit & miss. Sometimes it fails first time, sometimes it survives a couple of cycles.

There doesn't seem to be a Linux X11 driver, only Mac. Should that work on both?

EDIT 3 -
Ahah! But getting rid of the "Performance Enhanced Graphics" option (go to bottles view, right click and settings) has made it survive half a dozen so far.
 
Last edited:

Squiffy

Active Member
Licensed User
Longtime User
Ok, outstanding issues :

1. Code completion is really slow. It takes a disruptive amount of time to display anything. Normal typing (say in a comments line where no code completion is attempted) is fine.

2. Just realised I can't compile. How do I install the Java JDK? The one offered by Crossover is just the JRE. I'm further assuming we are stuck with j7?

Those two issues, coupled with a few "odd" random blank screen pop pups, seem to be the only barrier at the moment for me. Going better than I expected
 

Squiffy

Active Member
Licensed User
Longtime User
I will return to this at some point, but for now I have cheated and installed a Windows 7 VM under Qubes. Runs like a dream.
 

Squiffy

Active Member
Licensed User
Longtime User
Qubes turned out to be a pain in the rear end. Twice I had to reinstall. Might have been my fault, but bleah, anyway ...

Back to getting B4X running under wine
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…