When you use Java in Function Compute, you need to define a handler for functions. Function Compute execute the function starting from this handler. This topic describes how to configure a handler for a Java function in the console.
Procedure
Log on to the Function Compute console. In the left-side navigation pane, click Services & Functions.
In the top navigation bar, select a region. On the Services page, click the desired service.
- On the Functions page, click Create Function.
- On the Create Function page, click Use Built-in Runtime. In the Code section, select a Java runtime environment. In the Advanced Settings section, configure Handler. For Java functions, you must specify the handler in the
[Package name].[Class name]::[Method name]format. For example, if the name of your package is example, the class type is HelloFC, and method is handleRequest, the handler can be configured asexample.HelloFC::handleRequest.