Autor Beitrag
madmat
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28



BeitragVerfasst: Fr 21.05.04 12:34 
Moin,

gibts ne Möglichkeit aus einem delphi programm heraus per buttonclick ein javaprogramm ausführen zu lassen ?

_________________
mfg
madmat
Life is what happens while you ´re making other plans
Ja-Pa
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 458

Win XP, Suse 9.3
D1, D3, D5 Std, D7 Pro, D2005 Pers, Kylix 3
BeitragVerfasst: Fr 21.05.04 14:42 
Wie du externe Programme ausführst kannst du hier www.delphi-forum.de/viewtopic.php?t=2887 nachlesen.
Um ein Java-Programm zu starten, musst du nichts anderes tun, als den Java-Interpreter (wjview.exe oder javaw.exe) zus starten und ihm als Parameter den Namen und Pfad der class bzw. jar-Datei zu übergeben.

Also zum Beispiel:

ausblenden Delphi-Quelltext
1:
ShellExecute(Handle, 'open', 'c:\windows\wjview.exe', 'c:\javaprogramm.jar', nil, SW_SHOWNORMAL);					


Und vergiss nicht ShellAPI zu der uses-Liste hinzuzufügen!

_________________
Der Autor dieses Textes haftet nicht für Schäden an Soft- oder Hardware
oder Vermögensschäden, die durch das Benutzen des Textes entstehen.
madmat Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 28



BeitragVerfasst: Sa 22.05.04 11:06 
ahh, ok, vielen dank.
ist es weiterhin irgendwie möglich dem aufgerufenen javaprogramm parameter zb. aus einem editfeld zu übergeben und das ergebnis des java-programmes in ein memofeld um zu leiten ?

_________________
mfg
madmat
Life is what happens while you ´re making other plans