B4J Question B4J bluehost VPS

PACHODURAN1974

Member
Licensed User
Longtime User
Hello, I need your help, I am starting to work with B4J.

I made a B4J Server application and in local mode it works fine.

I need to install it on a hosting (Bluehost VPS), I don't know what I should do to make it work for me.

thank you
 

OliverA

Expert
Licensed User
Longtime User
What operating system is on your VPS? Note: It's not very clear from the quick look at Bluehost's VPS page what OS they run on the VPS
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
linux servers
Which distribution? Which Version? For example, could be
Distribution: Ubuntu Server
Version: 18.04.3LTS
Why? Distributions have various means of updating themselves/fetching packages to be installed.
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Ok, looking at some support files, try
B4X:
yum list java
Note: Via the ssh connection
 
Upvote 0

PACHODURAN1974

Member
Licensed User
Longtime User
Hi, thanks for your help.

The OS:
CentOS Linux release 7.8.2003 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.8.2003 (Core)
CentOS Linux release 7.8.2003 (Core)


----
[email protected] [~]# yum list java
Loaded plugins: fastestmirror, langpacks, universal-hooks
Determining fastest mirrors
* EA4: 206.130.99.76
* cpanel-addons-production-feed: 206.130.99.76
Error: No matching Packages to list


thanks
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Hah! You're good to go. Just make sure you use 1.8 in B4J
 
Upvote 0

PACHODURAN1974

Member
Licensed User
Longtime User
Hi, yes ,

C:\Users\Pacho>java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)

Thanks
 
Upvote 0

PACHODURAN1974

Member
Licensed User
Longtime User
Hello, I am testing an example that comes in the B4J (guessmynumber)
I copy all files include a "www" folder in a hosting folder.
I run the hosting and it opens the page but does nothing when testing the buttons.
The page is

bye
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
1) the content of the www folder in the Objects folder of the server example projects has nothing to do with the http server that is already installed on your system. The generated .jar file located in the Objects folder has its own http server (Jetty)
2) place the produced .jar file in a separate location that has nothing to do with the already installed http server. For example /myserver. In that location, place both the .jar file and the www folder that is located in the Objects folder
3) For simple testing, go into the newly created folder and use java -jar to launch the .jar file of your project.
4) In the source, note the port that your project will listen to. It will be something like 51041, 51042 or something like that.
5) Once your application is running and you know your port number then go to http://www.gertechvps.com:XXXXX where XXXXX is the port number you found the the source file. BTW, when you launch the project via java -jar, it will print out the port number (look closely).
6) If you want to have your project run in the background then look at
a) nohup: https://www.b4x.com/android/forum/threads/server-run-a-server-on-a-vps.60378/#content
b) systemd: https://www.b4x.com/android/forum/t...automatically-starting-at-boot.85739/#content
 
Upvote 0

PACHODURAN1974

Member
Licensed User
Longtime User
Hello, I would like to ask you for help with another query.
I've been looking at B4J and it has 5 types of projects.
Can you install the applications made in any of these types of projects on the linux server? I was checking that there are some that have a more friendly GUI.
 
Upvote 0
Top