I have an application written in Java. The application has several UI controls in it (textboxes, grids, buttons, etc.) I need to develop .NET application, which would be able to list UI elements and read text data from them. I have no problem obtaining Window handle for Java app, but after that I am stuck.
Java app is third-party and can't be modified in any way. I have zero experience in Java, but strong experience in C#.
I tried using Java Access Bridge, but it does not seem to work. As far as I understand, Java app needs to support Java Accessibility API, which it probably does not.
Please, share your experience with similar task or simply point me in a right direction.
How to enumerate/read UI controls from outside Java VM?
I found the solution. It seems Java Access Bridge is still supported for my java app, but I couldn't make it work at first.
Tips:
WinForms app is required to use Java Access Bridge API and I was trying to access it from console .NET app. (WPF should be supported too, but I didn't test it)
Windows_run method should be called inside form's constructor. Just before you access any other API functions.
Java Access Bridge should be enabled in file accessibility.properties (folder: C:\Program Files\Java\jre7\lib)