You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/en/guide/task/java.md
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Overview
2
2
3
-
This node is for executing java-type tasks and supports using files and jar packages as program entries.
3
+
This node is used to execute tasks of the `Java` type and supports running `jar` packages of the `FAT_JAR` and `NORMAL_JAR` types.
4
4
5
5
# Create Tasks
6
6
@@ -20,24 +20,38 @@ This node is for executing java-type tasks and supports using files and jar pack
20
20
| 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. |
21
21
| Main Parameter | Java program main method entry parameter. |
22
22
| Java VM Parameters | JVM startup parameters. |
23
-
| Script | You need to write Java code if you use the Java run type. The public class must exist in the code without writing a package statement. |
23
+
| Main Class Name | Fully Qualified Name of the Main Class (Optional) |
24
+
| Main Package | Select the main program package to run the application. |
24
25
| 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. |
25
26
26
27
## Example
27
28
28
-
Java type tasks have two modes of execution, here is a demonstration of executing tasks in Java mode.
29
+
There are two execution modes for Java task types, which will be demonstrated separately here.
`normal1.jar` is the entry point of the program, and `normal2.jar` contains the required dependencies. The entry point of the program must be specified in the main program package, and all the dependencies along with the program entry `jar` files should be selected in the resource file to ensure correct execution.
38
52
39
53
## Note
40
54
41
-
When you run the task in JAVA execution mode, the public class must exist in the code, and you could omit writing a package statement.
55
+
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.
56
+
2. NORMAL_JAR should provide the main class name (optional), while FAT_JAR does not need to provide the main class name.
42
57
43
-
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.
0 commit comments