All Products
Search
Document Center

Function Compute:How do I configure a handler in a Java runtime?

Last Updated:Aug 20, 2025

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

  1. Log on to the Function Compute console. In the left-side navigation pane, click Services & Functions.

  2. In the top navigation bar, select a region. On the Services page, click the desired service.

  3. On the Functions page, click Create Function.
  4. 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 as example.HelloFC::handleRequest. edit-Javafunction-handler