write-script-java

Enforce a standard Main class entry point for Windmill Java scripts.

17.5k|1.1k|Updated May 5, 2022
One-click install
npx skills add https://github.com/windmill-labs/windmill --skill write-script-java
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-script-java
Source: https://github.com/windmill-labs/windmill/tree/main/system_prompts/auto-generated/skills/write-script-java
Command: npx skills add https://github.com/windmill-labs/windmill --skill write-script-java

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers to implement Java scripts with a standardized entry point— a Main class featuring a public static Object main method — so Windmill can reliably load, execute, and compose Java scripts.

Core Features & Use Cases

  • Enforce a Main class named Main with a public static Object main(String name, int count) signature.
  • Promote explicit Maven dependencies at the top of the file to ensure reproducible builds (e.g., Gson for JSON handling).
  • Support Windmill-compatible scripting workflows, including compiling, running, and packaging Java scripts for deployment.

Quick Start

Place your Java source files in a project folder, implement the Main class exactly as specified, and follow Windmill’s standard build and run steps to validate inputs and outputs.

Frequently Asked Questions about write-script-java

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a Java script that Windmill can execute?

Write a Java script with a Main class containing a public static Object main method as the entry point. Windmill uses this standardized interface to reliably load, compile, and run your Java code with consistent build and execution workflows.

What Maven dependencies should I use for JSON handling in Java scripts?

Use Gson for JSON handling in your Java scripts. Explicitly declare Maven dependencies at the top of your file to ensure reproducible builds and let Windmill reliably package and deploy your scripts.

Can I use Maven dependencies in my Java script?

Yes. Windmill supports explicit Maven dependencies declared at the top of your Java file. This enables reproducible builds and ensures reliable compilation, testing, and packaging of your scripts for deployment.

How do I structure a Java script for Windmill's build and test workflow?

Implement a Main class with the exact signature public static Object main(String name, int count). Place your source files in a project folder and follow Windmill's standard build and run steps to validate inputs and outputs during packaging.

Why does Windmill require a specific Main class signature?

The standardized Main class with a public static Object main method enables Windmill to reliably compose, execute, and integrate Java scripts into workflows with a consistent interface across all Java-based tasks and deployments.

What happens if my Java script doesn't follow Windmill's Main class format?

Windmill cannot reliably load or execute Java scripts without the enforced Main class entry point. Following the standardized format ensures your scripts compile, test, and package correctly within Windmill's build system.