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'.)

Programs & ProcessesRunJava

概述

Run Java 是 AutoFlowRPA 中 Programs & Processes 类别下的无代码自动化步骤。 当工作流执行到此处时,它会在单个步骤中完成其操作。 您可以配置 6 个参数,精确控制其行为方式。 它是可在可视化编辑器中拖入工作流的 340 个命令之一,无需编写脚本。

功能说明

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'.)

参数

参数类型是否必填默认值说明
Java codemultiline
必填Full Java source with a main() method. Variables are supported: {{{name}}} markers are replaced with their value before compiling.
示例: public class Main { public static void main(String[] args) { System.out.println("Hello {{{userName}}}"); } }
支持变量
Extra classpathstring
可选Optional libraries/JARs to compile and run against (passed via -cp).
示例: C:/apps/lib/*
支持变量
Program argumentsstring
可选
支持变量
java executablestring
可选javaPath to 'java'; defaults to 'java' on PATH.
支持变量
javac executablestring
可选javacPath to 'javac' (the JDK compiler); defaults to 'javac' on PATH.
支持变量
Store stdout invariable
可选
示例: output

如何使用 Run Java

  1. 1

    打开 AutoFlowRPA,将 Run Java 命令从 Programs & Processes 分组拖放到画布上。

  2. 2

    在侧边面板中设置其参数——Run Java 有 6 个可配置字段。

  3. 3

    将它连入你的工作流并点击运行。一切都在你的本机上本地执行。

常见问题

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'.)

Run Java 命令属于哪个分组?

Run Java 属于 Programs & Processes 分组。AutoFlowRPA 附带 340+ 个现成命令,无需代码即可组合使用。

Run Java 命令需要任何参数吗?

需要——Run Java 有 6 个可配置字段,均可在可视化节点编辑器中编辑。

更多 Programs & Processes 命令

准备好自动化你的繁琐工作了吗?

立即开始 30 天免费试用。无需信用卡,无任何约束。