Skip to content

Add Cloud Agent dev environment for the Windows Java client - #60

Open
ShawnyinsGit wants to merge 1 commit into
mainfrom
cursor/win-client-dev-env-cb3d
Open

ShawnyinsGit wants to merge 1 commit into
mainfrom
cursor/win-client-dev-env-cb3d

Conversation

@ShawnyinsGit

Copy link
Copy Markdown
Collaborator

Summary

Adds a Cloud Agent development environment so an agent can build and debug the Windows desktop client (ahakeyconfig-win-java/ — Java 17 + JavaFX, Maven) directly on the Linux Cloud Agent VM.

  • .cursor/environment.json — declares the environment; install runs .cursor/install.sh.
  • .cursor/install.sh (idempotent):
    • installs maven + the JavaFX GUI runtime libs (libgtk-3-0, libgl1, libxtst6, ...) + xvfb when missing (the pre-installed JDK 21 compiles the Java 17 target);
    • builds the client with mvn -f ahakeyconfig-win-java/pom.xml -B -DskipTests package;
    • prints run/debug commands.

Why this works for the "Windows" client on Linux

The Windows client is plain Java/JavaFX bytecode built with Maven, so the produced jar is the same one that runs on Windows. Maven auto-resolves the Linux JavaFX natives (javafx-*-17.0.10-linux.jar), so the GUI launches and is debuggable on the Cloud Agent's VNC desktop.

Validation (performed on a Linux Cloud Agent VM)

Check Result
mvn package (ahakeyconfig-win-java) BUILD SUCCESSahakey-studio-1.0.0.jar + 17 runtime jars
install.sh from clean state Passed (rebuilds jar, exit 0)
Launch GUI on VNC desktop AhaKey Studio window renders
Interactivity Switching Claude/Cursor/Codex tabs updates the K1–K4 map and inspector; no glitches/crash

Run / debug:

cd ahakeyconfig-win-java
DISPLAY=:1 java -cp "target/ahakey-studio-1.0.0.jar:target/lib/*" com.example.ahakey.Main

Out of scope on a Linux VM (documented in the script)

  • Native Windows .exe / installer packaging (build-exe.ps1, build-installer.ps1, Inno Setup, jpackage-on-Windows) — needs a Windows runner.
  • Windows-only JNA runtime paths (platform/windows/*, Win+H voice, low-level keyboard hook) — they compile here but only execute on Windows.
  • The macOS Swift client — needs a macOS runner (CI already uses macos-15).

Generated by a Cursor Cloud Agent.

Adds .cursor/environment.json + .cursor/install.sh so a Cloud Agent can
build and debug the Windows desktop client (ahakeyconfig-win-java,
Java 17 + JavaFX, Maven) on the Linux VM. The install builds the client
with Maven (Linux JavaFX natives auto-resolved) and installs the GTK/GL
libs needed to launch the JavaFX GUI on the VNC desktop. Native Windows
.exe/installer packaging and Windows-only JNA runtime paths remain
Windows-only and are documented as out of scope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants