I'm trying to run a simple java file:
filename - steve.java
public class steve
{
public static void main(String[] args)
{
System.out.println("JAVA");
System.exit(0);
}
}
from a simple shell script:
filename - payment.sh
#!/bin/sh
CLASSPATH=/u1/java/s.jar:.
PATH=/usr/bin:/bin:/usr/local/bin:/usr/local/jdk1.1.8/bin
export CLASSPATH PATH
cd /u1/java
java steve
echo "shell done"
exit
from a simple php page:
filename - execjava.php
<?
$ret = /u1/java/payment.sh; // these (`) are backticks
print str_replace("\n","<BR>",$ret);
?>
php end
When I do that, the browser just hangs waiting for a response. If I replace the java command in the shell script with something easy, say "ls", it returns fine. I've tried other java files, but it doesn't help. Any ideas?
Thanks much.
STeve