Run Java
Compile and run Java source code directly. Paste a class with a 'public static void main' method; it is compiled with javac and run with java, and its stdout is captured. (To run a .jar instead, use Run CMD: 'java -jar file.jar'.)
Overview
Run Java is a no-code automation step in the Programs & Processes category of AutoFlowRPA. It performs its action in a single step when the workflow reaches it. You can configure 6 parameter(s) to control exactly how it behaves. It is one of 369 commands you can drag into a workflow in the visual builder — no scripting required.
What it does
Compile and run Java source code directly. Paste a class with a 'public static void main' method; it is compiled with javac and run with java, and its stdout is captured. (To run a .jar instead, use Run CMD: 'java -jar file.jar'.)
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| Java code | multiline | Required | Full Java source with a main() method. Variables are supported: {{{name}}} markers are replaced with their value before compiling. Example: public class Main {
public static void main(String[] args) {
System.out.println("Hello {{{userName}}}");
}
} Supports variables | |
| Extra classpath | string | Optional | Optional libraries/JARs to compile and run against (passed via -cp). Example: C:/apps/lib/* Supports variables | |
| Program arguments | string | Optional | Supports variables | |
| java executable | string | Optional | java | Path to 'java'; defaults to 'java' on PATH. Supports variables |
| javac executable | string | Optional | javac | Path to 'javac' (the JDK compiler); defaults to 'javac' on PATH. Supports variables |
| Store stdout in | variable | Optional | Example: output |
How to use Run Java
- 1
Open AutoFlowRPA and drag the Run Java command from the Programs & Processes group onto the canvas.
- 2
Set its parameters in the side panel — Run Java has 6 configurable field(s).
- 3
Connect it into your workflow and press Run. Everything executes locally on your machine.
Frequently asked questions
What does the Run Java command do?
Compile and run Java source code directly. Paste a class with a 'public static void main' method; it is compiled with javac and run with java, and its stdout is captured. (To run a .jar instead, use Run CMD: 'java -jar file.jar'.)
Which group does the Run Java command belong to?
Run Java is part of the Programs & Processes group. AutoFlowRPA ships with 369+ ready-made commands you can combine without code.
Does the Run Java command take any parameters?
Yes — Run Java has 6 configurable field(s), all editable in the visual node editor.
More Programs & Processes commands
Ready to automate your busywork?
Start your free 30-day trial today. No credit card, no commitment.