Mar 13, 2014 Replies: 36 B4J v1.80 adds support for remote debugging using B4J-Bridge, a tool similar to the beloved B4A-Bridge. The purpose of B4J-Bridge is to allow you to connect the IDE to a remote machine such as a Mac computer or a Raspberry Pi board and to easily debug your app on the remote machine. The connection is done over the network (usually the local network). Instructions Download b4j_bridge.jar to the remote machine: www.b4x.com/b4j/files/b4j-bridge.jar Note that you can download it with this command: Code: wget www.b4x.com/b4j/files/b4j-bridge.jar 'or (remove space between 'c' and 'url') c url -o b4j-bridge.jar https://www.b4x.com/b4j/files/b4j-bridge.jar Tip: delete the previous version before download: rm b4j-bridge.jar Make sure that Java 8+ is installed on the remote machine. Open a terminal and run java -jar b4j-bridge.jar: If you are running it on a raspberry pi together with the jPi4J library then you need to run it with: Code: sudo java -jar b4j-bridge.jar Choose Tools -> B4J-Bridge -> Connect and enter the remote machine IP address: The status icon should change to: Now you can run your app in Release or Debug mode and debug it directly on the target machine: You can disconnect with Shift + F2 and later reconnect with F2. Note that the jar is copied to the target machine and deployed under a folder named tempjars. If the debugger fails to connect to the remote machine then you should open the following ports for incoming connections: 59812, 8937 and 8938 Updates v1.62 - Fixed the extra empty lines in the logs on remote Windows computers (https://www.b4x.com/android/forum/threads/ide-log-extra-line-break-with-b4j-bridge.170914) v1.50 - Adds support for signed Mac Java 14. See the Java section here: https://www.b4x.com/android/forum/threads/building-notarized-mac-packages.130890 v1.44 - Adds support for Java versions above Java 11. Source code is attached. Jar is available here: www.b4x.com/b4j/files/b4j-bridge.jar Attachments Bridge-Src.zip Bridge-Src.zip 11.5 KB · Views: 556 Last edited: May 4, 2026 Click to expand...
B4J v1.80 adds support for remote debugging using B4J-Bridge, a tool similar to the beloved B4A-Bridge. The purpose of B4J-Bridge is to allow you to connect the IDE to a remote machine such as a Mac computer or a Raspberry Pi board and to easily debug your app on the remote machine. The connection is done over the network (usually the local network). Instructions Download b4j_bridge.jar to the remote machine: www.b4x.com/b4j/files/b4j-bridge.jar Note that you can download it with this command: Code: wget www.b4x.com/b4j/files/b4j-bridge.jar 'or (remove space between 'c' and 'url') c url -o b4j-bridge.jar https://www.b4x.com/b4j/files/b4j-bridge.jar Tip: delete the previous version before download: rm b4j-bridge.jar Make sure that Java 8+ is installed on the remote machine. Open a terminal and run java -jar b4j-bridge.jar: If you are running it on a raspberry pi together with the jPi4J library then you need to run it with: Code: sudo java -jar b4j-bridge.jar Choose Tools -> B4J-Bridge -> Connect and enter the remote machine IP address: The status icon should change to: Now you can run your app in Release or Debug mode and debug it directly on the target machine: You can disconnect with Shift + F2 and later reconnect with F2. Note that the jar is copied to the target machine and deployed under a folder named tempjars. If the debugger fails to connect to the remote machine then you should open the following ports for incoming connections: 59812, 8937 and 8938 Updates v1.62 - Fixed the extra empty lines in the logs on remote Windows computers (https://www.b4x.com/android/forum/threads/ide-log-extra-line-break-with-b4j-bridge.170914) v1.50 - Adds support for signed Mac Java 14. See the Java section here: https://www.b4x.com/android/forum/threads/building-notarized-mac-packages.130890 v1.44 - Adds support for Java versions above Java 11. Source code is attached. Jar is available here: www.b4x.com/b4j/files/b4j-bridge.jar
Erel B4X founder Staff member Licensed User Longtime User Sep 14, 2016 #21 Which computer are you using?
jcohedman Member Licensed User Longtime User Sep 21, 2016 #22 hi, with this statement: sudo /home/pi/jdk8/bin/java -jar b4j-bridge.jar runs ok!
M MbedAndroid Well-Known Member Licensed User Longtime User Oct 6, 2016 #23 there is no way to debug on distance? even when i set the portforward? I tried to insert a external Ip adress but that isnt accepted
there is no way to debug on distance? even when i set the portforward? I tried to insert a external Ip adress but that isnt accepted
Erel B4X founder Staff member Licensed User Longtime User Oct 6, 2016 #24 It is possible. MbedAndroid said: I tried to insert a external Ip adress but that isnt accepted Click to expand... What is not accepted? Make sure to enter the ip address and not the host name.
It is possible. MbedAndroid said: I tried to insert a external Ip adress but that isnt accepted Click to expand... What is not accepted? Make sure to enter the ip address and not the host name.
M MbedAndroid Well-Known Member Licensed User Longtime User Oct 6, 2016 #25 ok, i see if i start to enter a new Ip, you will get "invalid adress" until i entered all the numbers. thought it was already rejected on the the first group of the ip number sorry
ok, i see if i start to enter a new Ip, you will get "invalid adress" until i entered all the numbers. thought it was already rejected on the the first group of the ip number sorry
Erel B4X founder Staff member Licensed User Longtime User Dec 25, 2016 #26 B4J-Bridge v2.20 was released. It includes an built-in FTP server. This makes it simpler to download or upload files to the remove computer. Note that you can disable the FTP server with the -disableftp parameter: Code: java -jar b4j-bridge -disablefto
B4J-Bridge v2.20 was released. It includes an built-in FTP server. This makes it simpler to download or upload files to the remove computer. Note that you can disable the FTP server with the -disableftp parameter: Code: java -jar b4j-bridge -disablefto
Starchild Active Member Licensed User Longtime User Dec 27, 2016 #27 Great addition. I successfully tried using FTP FileZilla to access my remote Linux development box (ubuntu) using the FTP server of b4j-bridge v2.20. Works great, but it is limited by the available root on the Linux box being the TempJars folder. It would be useful to be able to move higher up the directory tree so the b4j-bridge FTP server could be used to access other directories/files. Maybe another command line switch. Anyway, it's a very simple and useful addition for quickly moving application support files onto the Linux box. Thanks.
Great addition. I successfully tried using FTP FileZilla to access my remote Linux development box (ubuntu) using the FTP server of b4j-bridge v2.20. Works great, but it is limited by the available root on the Linux box being the TempJars folder. It would be useful to be able to move higher up the directory tree so the b4j-bridge FTP server could be used to access other directories/files. Maybe another command line switch. Anyway, it's a very simple and useful addition for quickly moving application support files onto the Linux box. Thanks.
Erel B4X founder Staff member Licensed User Longtime User Nov 28, 2018 #28 B4J-Bridge v1.42 released. Adds support for Java 11.
D Don Oso Active Member Licensed User Longtime User Dec 5, 2018 #29 B4j-bridge v1.42 fails in Ubuntu 16.04 with just java 8 installed its possible to upload the version who works with java 8? Thanks
B4j-bridge v1.42 fails in Ubuntu 16.04 with just java 8 installed its possible to upload the version who works with java 8? Thanks
D Don Oso Active Member Licensed User Longtime User Dec 5, 2018 #30 Don Oso said: B4j-bridge v1.42 fails in Ubuntu 16.04 with just java 8 installed its possible to upload the version who works with java 8? Thanks View attachment 75077 Click to expand... I found in my backup projects the source code of b4j-bridge v1.20 .. now im running. Last edited: Dec 5, 2018
Don Oso said: B4j-bridge v1.42 fails in Ubuntu 16.04 with just java 8 installed its possible to upload the version who works with java 8? Thanks View attachment 75077 Click to expand... I found in my backup projects the source code of b4j-bridge v1.20 .. now im running.
Erel B4X founder Staff member Licensed User Longtime User Dec 6, 2018 #31 B4J-Bridge v1.43 released. Same as v1.42 but compiled with Java 8 to make it compatible with Java 8+.
B4J-Bridge v1.43 released. Same as v1.42 but compiled with Java 8 to make it compatible with Java 8+.
Erel B4X founder Staff member Licensed User Longtime User Feb 6, 2020 #32 v1.44 - Adds support for Java versions above Java 11.
A ajk Active Member Licensed User Longtime User May 10, 2020 #33 OMG super tool. My mac is lucky. Erel you are great ! Added _2020_06_01_ Chapeau bas Erel ! My VPS server remote debugging works ! Last edited: Jun 1, 2020
OMG super tool. My mac is lucky. Erel you are great ! Added _2020_06_01_ Chapeau bas Erel ! My VPS server remote debugging works !
Erel B4X founder Staff member Licensed User Longtime User May 20, 2021 #34 v1.50 - Adds support for signed Mac Java 14. See the Java section here: https://www.b4x.com/android/forum/threads/building-notarized-mac-packages.130890
v1.50 - Adds support for signed Mac Java 14. See the Java section here: https://www.b4x.com/android/forum/threads/building-notarized-mac-packages.130890
J JanG Member Licensed User Longtime User May 18, 2022 #35 Erel said: The source code of B4J-Bridge is attached. It is not required for running B4J-Bridge. Click to expand... Would you share the source of 1.50? This one is only 1.44. Thank you and bye... Jan
Erel said: The source code of B4J-Bridge is attached. It is not required for running B4J-Bridge. Click to expand... Would you share the source of 1.50? This one is only 1.44. Thank you and bye... Jan
Erel B4X founder Staff member Licensed User Longtime User May 4, 2026 #37 v1.62 - Fixed the extra empty lines in the logs on remote Windows computers (https://www.b4x.com/android/forum/threads/ide-log-extra-line-break-with-b4j-bridge.170914)
v1.62 - Fixed the extra empty lines in the logs on remote Windows computers (https://www.b4x.com/android/forum/threads/ide-log-extra-line-break-with-b4j-bridge.170914)