I want to connect to java via php and print the result out in php. Now I want to send a parameter to java and return it to php to see how it works. How can I do this? I have this code so far:
PHP:
exec("java jar/name.jar", $output);
print_r($output);
Java:
public class Main {
public static void main(String[] args) {
System.out.print(args[0]);
}
}
The result is
Array ( )