PHP, how to execute a Java program

أرسل من قبل Rammstein في الجمعة, 2007/12/14 - 4:28pm.
عضو فعال
صورة Rammstein

تاريخ التسجيل: 2006-02-27
مشاركات: 175

الجامعة: تشرين
الكلية: الهندسة المعلوماتية
المرحلة: متخرج
الاختصاص: هندسة برمجيات

Hey all,
I have a problem calling a Java program from PHP script.
I tried the following:


exec('java Foo');
System('java Foo');
Shell_exec('java Foo');

where Foo is a main class located in the CLASSPATH.
I also tried:


$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("java Foo", 3, false);

but it makes Apache hang and wait the process to finish.
And I tried the Java-PHP bridge but for some reason, it makes Apache does a fatal error and terminates.

Any ideas?it's urgent!

 
دخول أو تسجيل لإرسال التعليقات | قراءة: 255

خيارات عرض التعليقات

اختر طريقتك المفضلة لعرض التعليقات و اضغط "حفظ الإعدادات" لتفعيل تغييراتك.
السبت, 2007/12/15 - 9:59am
عضو فعال
صورة iman

تاريخ التسجيل: 2006-12-01
مشاركات: 276

actuallyi have not try this any more
this link may helps you

How Perfect You are O Allah, and I praise You. LA Ilah Ila Lah, I seek Your forgiveness and turn to You in repentance

 
دخول أو تسجيل لإرسال التعليقات
الإثنين, 2007/12/17 - 2:50am
عضو فعال
صورة Rammstein

تاريخ التسجيل: 2006-02-27
مشاركات: 175

الجامعة: تشرين
الكلية: الهندسة المعلوماتية
المرحلة: متخرج
الاختصاص: هندسة برمجيات

I've tried all the ways explained in that manual, but no use Smile
I'll try to figure out something, maybe using JNI to implement the methods I need from Java packages in C++ then exec the C++ utility through PHP (What a twist!)

Thank you for your concern.

 
دخول أو تسجيل لإرسال التعليقات