B4J Question Unable to start b4j non-ui app on vps server

toby

Well-Known Member
Licensed User
Longtime User
Linux server: Centos 7
What I've done:
1. Download Java sdk 11, linux version to my Windows 10
2. Unzipped it with 7Zip to a folder named java11 which contains the bin folder as one of its child folders
3. Uploaded entire java11 folder to my server at /home/user1/java11
4. Compiled my test app in release mode and the resulting jar file is test.jar
5. Uploaded test.jar to /home/user1 folder
6. Ran the following terminal command
B4X:
nohup /home/user1/java11/bin/java -jar /home/user1/test.jar >nohup.out &

And I got this log
nohup: failed to run command '/home/user1/java11/bin/java': No such file or directory
What am I missing?

Thanks in advance!
 
Solution
I ended up installing java using terminal even though the instructions indicates that installation is not needed.

After the installation, everything works. I don't need to specify java path any more
B4X:
nohup java -jar myjar.jar >nohup.out &

toby

Well-Known Member
Licensed User
Longtime User
This has to point to the location of java on your vps. I doubt it's correct.
That's the location of java I uploaded and I for this post replaced the actual username with "user1" for simplicity
 
Upvote 0

Marvel

Active Member
Licensed User
You have to confirm. The error message shows that the path or file does not exist.

Mine is like this;

user1/java/jdk-17.0.1/bin/java -jar
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
java11/bin contains those usual files such as java, javac, etc.
 
Last edited:
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
I'm not familiar to linux and my vps is fully managed and as a result I might have made some mistakes not obvious to me.
 
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
I ended up installing java using terminal even though the instructions indicates that installation is not needed.

After the installation, everything works. I don't need to specify java path any more
B4X:
nohup java -jar myjar.jar >nohup.out &
 
Upvote 0
Solution
Top