B4J Tutorial Create shared folders in Virtual Box Ubuntu 20.04 machine to transfer files to compile in Linux your B4J Apps and how to use B4J Bridge

I recently tried to create a shared folder for an Ubuntu machine in Virtual Box with the host to transfer the jar files to be compiled and packed using the external (not integrated) B4JPackager11.jar. I googled a lot and saw YT videos and gathered these instructions for my personal use as a knowledge base. I am posting them here and it might be useful to someone else in the forum:

Instructions:

1) Right click on Ubuntu desktop and open terminal
2) Write:
sudo apt-get update
sudo apt-get install build-essential gcc make perl dkms
reboot

3) Select Devices > Insert Virtual Box Host additions disk
4) It will open a window asking you if you want it to run it automatically. Select Yes
5) It will Install
6) Power off the machine
7) Create the folder you want to share in Windows
8) Go to to virtual machine settings in the section Shared Folders and add the folder to the Shared Folders of the machine selecting also automount.
9) Power up the virtual machine
10) Right click on desktop and open terminal
11) Write:
whoami
(It will reply with current user)
sudo adduser {urername} vboxsf
(Insert password for this user)
12) Reboot
13) You are good to go
 

hatzisn

Well-Known Member
Licensed User
Longtime User
Hi @Erel,

I tried before with the B4J Bridge and I did not succeed. I tried again today but the same thing happened. Here are the results:

Terminal running B4J in Ubuntu:

1605792338298.png


B4J Procedure:

1605792412627.png


1605792446910.png


Meanwhile all my network is at: 192.168.1.xxx

I tried opening outgoing connections to the ports 6790 and 6781 as described in the previous message of B4J Bridge and no luck again. Am I doing something wrong?

Windows Defender outgoing rules
(Name, Local Address, Local Port, Remote Address, Remote Port, .....)
1605792124176.png
 

hatzisn

Well-Known Member
Licensed User
Longtime User
Never mind. I found the answer. I had to power off the Ubuntu virtual machine, go to its settings and change in the Network section the "connected to" setting from "NAT" to "bridged card" and select my host's card bellow.
 
Last edited:
Top