Is it possible to control a java application from a Delphi application?

My problem is pretty simple. I have an application written in java and I want to send ex commands to it (click the button, send some strokes, click the menu item) from my application, which I will write in delphi. Is this concept possible?

+5
source share
6 answers

I really had to do this in the last place I worked, you can get around it with complex window events, etc ... as mentioned above, but if you have access to the Java source, just write other access methods that call (i.e., launch the public static void main (String [] args), either through its own call or through the command line.

OR

Java/Delphi TCP/IP XML, ( , , , ).

, , . , JNI Delphi, Delphi 7. , , .

, TCP/IP, , . , , , "myMenuItem.onClick()" , .

http://home.pacifier.com/~mmead/jni/delphi/

+4

, , Java GUI . SWT AWT, , . , GUI- GUI beans SWING, . swing toolkit Java.

+4

Java , Java Robot API ( JRE 1.3 ). Swing, , . , IPC, , , .

+3

: , Java .

Java, , , Java, , , () ! , , , Windows, , GUI, . Windows, , , Windows, .

, , , . mouse_event, , . , .

+2

mjn, , , Delphi Java Swing UI (TextField), Jframe NetBeans ClientEditor.

, Java TCP, XML, Windowing IPC,

Delphi, Java-.

procedure TForm1.Button1Click(Sender: TObject);
begin
  FJFrame := Tjavax_swing_JFrame.Create('Client Editor');
  FClientEditor := Tclienteditor_ClientEditor.Create;
  FJFrame.GetContentPane().Add(FClientEditor);
  FJFrame.Pack;
  FJFrame.SetVisible(True);
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  // Delphi setting a value in a Java Swing UI component
  FclientEditor.FirstNameTextField.SetText('Delphi 1stName');
end;

The long type names in this example are simply clear and may be shorter, of course.

In addition, in this example there is no problem with JNI.

+2
source

Have you seen Java for Delphi ?

This allows you to invoke Java from Delphi, displaying Java types as Delphi types.

+1
source

All Articles