Skip to content

Commit

Permalink
Simplify docs descriptions and update images.
Browse files Browse the repository at this point in the history
  • Loading branch information
ailiujiarui committed Dec 1, 2024
1 parent 28e4eca commit 84e0756
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/docs/en/guide/task/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ This node is used to execute tasks of the `Java` type and supports running `jar`
| Module Path | pick Java 9 + 's modularity feature, put all resources into-module-path, and require that the JDK version in your worker supports modularity. |
| Main Parameter | Java program main method entry parameter. |
| Java VM Parameters | JVM startup parameters. |
| Main Class Name | Fully Qualified Name of the Main Class (Optional) |
| Main Package | Select the main program package to run the application. |
| Resources | External JAR packages or other resource files that are added to the classpath or module path and can be easily retrieved in your JAVA script. |

Expand Down Expand Up @@ -51,7 +52,6 @@ As shown in the figure.

## Note

1. When using the `FAT_JAR` run type, you must select the main program package along with the corresponding resource file, otherwise, the task will fail immediately.
2. When using the `NORMAL_JAR` run type, you must select the main program package and the corresponding resource file, otherwise, the task will fail immediately. The main program package determines where the program starts, and after selecting the resource file, it will be called using the `-cp` option when running the program.
3. For security reasons, when executing JAVA tasks, please use the environment management module to configure the JDK environment, such as `JAVA_HOME` and other environment variables.
1. For security reasons, when executing JAVA tasks, please use the environment management module to configure the JDK environment, such as `JAVA_HOME` and other environment variables.
2. NORMAL_JAR should provide the main class name (optional), while FAT_JAR does not need to provide the main class name.

6 changes: 3 additions & 3 deletions docs/docs/zh/guide/task/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
| 模块路径 | 开启使用JAVA9+的模块化特性,把所有资源放入--module-path中,要求您的worker中的JDK版本支持模块化 |
| 主程序参数 | 作为普通Java程序main方法入口参数 |
| 虚拟机参数 | 配置启动虚拟机参数 |
| 主类名 | 启动类的完整主类名(可选) |
| 主程序包 | 选择要运行程序的主程序包 |
| 资源 | 可以是外部JAR包也可以是其他资源文件,它们都会被加入到类路径或模块路径中,您可以在自己的JAVA脚本中轻松获取 |

Expand Down Expand Up @@ -54,7 +55,6 @@ java任务类型有两种运行模式,这里进行分别进行演示。

## 注意事项

1. 使用`FAT_JAR`运行类型必须选择主程序包,使用和对应的资源文件,否则任务会直接失败
2. 使用`NORMAL_JAR`运行类型必须选择主程序包和对应的资源文件,否则任务会直接失败。主程序包决定程序从哪里开始运行,选择资源文件之后,运行程序时,资源文件会以`-cp`的方式进行调用
3. 基于安全原因,执行JAVA任务时,请使用环境管理功能配置JDK环境,例如`JAVA_HOME`等环境变量
1. 基于安全原因,执行JAVA任务时,请使用环境管理功能配置JDK环境,例如`JAVA_HOME`等环境变量
2. `NORMAL_JAR` 应该提供主类名(可选),`FAT_JAR` 不需要提供主类名。

Binary file modified docs/img/tasks/demo/java_normal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 84e0756

Please sign in to comment.