Skip to content

winuse 0.2.0

Choose a tag to compare

@straygizmo straygizmo released this 22 Oct 08:10
· 38 commits to main since this release

winuse 0.2.0 adds Java Swing support: Swing windows are read and operated through Java Access Bridge like UI Automation apps, and winuse speaks the bridge's wire protocol itself, so 32-bit Java 7/8 JREs that ship only the legacy bridge work too.

Highlights

  • Java Swing through Java Access Bridge. Swing windows (SunAwt*) are read into the same element model as UIA (j{n} refs), so get_ui_tree, act / find / check, click, invoke, set_text, set_checked, select_item, get_text, get_list_items, assert_*, wait_for and scenario replay work on them. Menu items are listed and invokable while their menu is closed.
  • Built-in bridge client, no DLL. winuse talks the Java Access Bridge wire protocol directly (hidden client window, hello handshake, one memory-mapped file per JVM). Both wire formats are spoken: the wide one of JavaAccessBridge-32/64.dll and Java 9+'s javaaccessbridge.dll, and the legacy one of the suffix-less JavaAccessBridge.dll that 32-bit Java 7/8 JREs ship. Several JVMs of mixed formats at once. Tested on Temurin 21 x64, Temurin 8 x86 and Temurin 8 x86 on its legacy bridge, and confirmed on a 32-bit Java 7 application.
  • Enabling accessibility without touching the JRE. Apps started with process_run get JAVA_TOOL_OPTIONS=-Djavax.accessibility.assistive_technologies=com.sun.java.accessibility.AccessBridge (WINUSE_JAVA_ACCESSIBILITY=off disables it); for apps started any other way, winuse jab enable|disable|status manages %USERPROFILE%\.accessibility.properties.
  • Diagnostics. winuse doctor reports the client window and the JVMs connected to it, the user-profile enablement, and every Java window with its JVM: jvm.dll path and version, bitness, which JavaAccessBridge*.dll it loaded and its wire format, the Java and bridge versions the JVM reports, and whether the bridge answers. When a Java window cannot be read, get_ui_tree returns java_access_bridge with the reason and act reports no elements (java access bridge: ...); the window then falls back to visual grounding.
  • Settings: WINUSE_JAB (auto / off), WINUSE_JAVA_ACCESSIBILITY (on / off).

Install

  1. Install the .NET 10 runtime (or SDK).
  2. Unzip winuse-0.2.0-win-x64.zip into a folder.
  3. Register with Claude Code: claude mcp add winuse -- <folder>\winuse.exe --mcp
  4. Set JEV_API_KEY, or CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN, as user environment variables, then run winuse doctor.

Upgrading from 0.1.0: unzip over the old folder. Java apps need accessibility enabled in their JVM when they start (see above); restart them after winuse jab enable.

Known issues

  • get_table does not read Swing tables yet (get_table is not supported for Java elements yet).
  • A JRE without the Java side of the bridge (trimmed Java 8 without JavaAccessBridge-32.dll / access-bridge-32.jar, or a jlink image without jdk.accessibility) cannot be read, and a JVM on such a JRE fails to start when accessibility is requested (AWTError: Assistive Technology not found): set WINUSE_JAVA_ACCESSIBILITY=off for apps on such a JRE and do not use winuse jab enable. doctor reports the missing files. A Java app running elevated or as another user is out of reach.
  • type_text with Japanese text can be garbled under the Japanese IME (intermittent, under investigation).

Full changelog: CHANGELOG.md