B4J Question Deploying B4J web app on shared hosting via exec(); commands

DaniDPX

Member
Licensed User
Is it possible to use this on php and run B4J web app?
B4X:
<?php
// $output = shell_exec('ls -lart');
// echo "<pre>$output</pre>";
// echo shell_exec("which java");

$output = shell_exec("java -jar WebAppHelloWorld.jar"); 
echo "<pre>$output</pre>";
?>
 

keirS

Well-Known Member
Licensed User
Longtime User
Java would need to be installed on the shared server and the shell_exec function would have to be enabled. I would put money on the vast majority of shared hosting providers disabling shell_exec in php.ini
 
Upvote 0

DaniDPX

Member
Licensed User
Java would need to be installed on the shared server and the shell_exec function would have to be enabled. I would put money on the vast majority of shared hosting providers disabling shell_exec in php.ini

Well,
B4X:
 <?php echo shell_exec("which java");
is working on one shared hosting provider. Showing the path. But if it was disabled, this command will return empty response.

and this is not working here
$output = shell_exec("java -jar WebAppHelloWorld.jar");
Some of the commands are not executing...
 
Upvote 0
Top