note 16336 rejected from ref.java by jimw
| From: | jimw@php.net | Date: | Thu, 25 Oct 2001 23:11:16 +0000 |
| Subject: | note 16336 rejected from ref.java by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19437@lists.php.net to get a copy of this message | ||
have problem is how to run a JAVA class in php. I am try to install
a library(libphp_java.so) in php. and configure it in file(php.ini).
then try to run the class in php, but have problem are following
X-Powered-By: PHP/4.0.4pl1
Content-type: text/html
<html>
<body>
security properties not found. using defaults.
<br>
<b>Fatal error</b>: java.lang.UnsatisfiedLinkError: no php_java in
java.library.path in <b>../URLTest.php</b> on line <b>4</b><br>
SIGILL 4* illegal instruction
si_signo [4]: SIGILL 4* illegal instruction
si_errno [0]: Success
si_code [2]: ILL_ILLOPN [addr: 0xBFFFE2DA]
stackpointer=0xbfffd7f8
Full thread dump Classic VM (JDK-1.2.2_009, native threads):
"Finalizer" (TID:0x40f44320, sys_thread_t:0x81e0420, state:CW, native
ID:0xc04) prio=8
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:112)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174)
"Reference Handler" (TID:0x40f443b0, sys_thread_t:0x81d6338, state:CW,
native ID:0x803) prio=10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:424)
at
java.lang.ref.Reference$ReferenceHandler.run(Reference.java:114)
"SIGQUIT handler" (TID:0x40f443e0, sys_thread_t:0x81dad00, state:R,
native ID:0x402) prio=5
"main" (TID:0x40f441e0, sys_thread_t:0x8161d58, state:R, native
ID:0x400) prio=5
Monitor Cache Dump: java.lang.ref.Reference$Lock@40F443C0/40F79B20: <unowned>
Waiting to be notified:
"Reference Handler" (0x81d6338)
java.lang.ref.ReferenceQueue$Lock@40F44338/40F7A028: <unowned>
Waiting to be notified:
"Finalizer" (0x81e0420)
Registered Monitor Dump:
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
System class loader lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor cache lock: owner "main" (0x8161d58) 1 entry
Thread queue lock: owner "main" (0x8161d58) 1 entry
Monitor registry: owner "main" (0x8161d58) 1 entry
php code:
<html><body>
<?
$system = new Java('URLTest');
?>
</body></html>
java class code:
import java.net.*;
import java.io.*;
public class URLTest {
public static String abc;
public static void main(String args[]) throws IOException {
String line="";
abc="";
try {
URL TestUrl=new
URL("http://202.181.175.37/pccw/login.asp");
URLConnection connection = TestUrl.openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
PrintStream out = new
PrintStream(connection.getOutputStream());
out.print("uid="+URLEncoder.encode("guest")+"&pwd="+URLEncoder.encode("guest"));
out.close();
// Now we read the response
BufferedReader stream=new BufferedReader( new
InputStreamReader(connection.getInputStream()));
abc = stream.readLine();
while((line = stream.readLine()) != null)
System.out.println(line);
} catch(Exception ex) {
System.out.println(ex+"ajlsjf;lajsfjasf;laskj");
}
}
public String getAbc() throws Exception
{
return abc;
}
}