الانتقال إلى المحتوى

DDE


كيوكمبر

Recommended Posts

السلام عليكم و رحمة الله و بركاته
I have a java application that i want to invoke a .exe file from it and pass some arrgument and return the result of that .exe file into my .java file.
my colleauge says that this issue called Dynamic Data Exchange,
so please if you know how to open an .exe file from my .java file I'll appreciate his concern.

regards,
AA

رابط هذا التعليق
شارك

FileOutputStream fos = new FileOutputStream(args[0]);
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("java Hello 'Ahmed'");
StreamGobbler outputGobbler = new 
StreamGobbler(proc.getInputStream(), "OUTPUT", fos);

رابط هذا التعليق
شارك

السلام عليكم و رحمة الله و بركاته
أخي الكريم أحمد شكرا على أهتمامك ولكن لم أفهم قصدك
I've puttin the code in my program but i don't know what's the use of it du the compiler complaining for the "StreamGobbler" type.
my question is:
I have a java program that I want to send an parameters to a wgetacc.exe program that is in "C:\DDE_CLNT" dirctory.

thanks for your reply.
regards,
Ahmed Abdulla

رابط هذا التعليق
شارك

نفس الشي انته بتغير فقط في

Process proc = rt.exec("wgetacc.exe param1");



هنا بتلاقي مثال واضح لكيفية استخدام الكلاس StreamGobbler لياخذ الoutput من البرنامج الخارجي .
http://www.javaworld.com/javaworld/jw-12-2...1229-traps.html

رابط هذا التعليق
شارك

السلام عليكم ،

حاولت و تمكنت من تشغيلها و الحمد لله و شكرا لك.
بس حصلي موضوع غريب؟؟
شغلتها و بعدين بعد فترة من المحاولات الناجحة وقف البرنامج malfunctioning فمأدري ليش؟
أتضايقة و قلت أن الجافا ماتصلح؟
واحد قالي أن الجافا مع الكونسل ماعندها Synchronize ؟
المهم شكرا على الموقع و الرد المفيد و
أكيد بفتح الموقع و أشوف الكود و أجربه.

سلام

رابط هذا التعليق
شارك

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   تمت استعادة المحتوى السابق الخاص بك.   مسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

جاري التحميل
×
×
  • أضف...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية