Developing in Java. Overview
With Cloud Functions, you can run applications written in Java
The service provides several runtime environments with different versions. We do not recommend using obsolete versions of runtime environments.
Name |
Java version |
OS |
Preloaded |
Supported by the service |
java11 |
11 |
Ubuntu 18.04 |
No |
No |
java17 |
17 |
Ubuntu 18.04 |
No |
No |
java21 |
21 |
Ubuntu 22.04 LTS |
No |
Yes |
You can connect the SDK library
When creating a function version, the builder will automatically install all declared dependencies required for the function to run. To learn more about the requirements for declaring dependencies, see Building and managing Java function dependencies.
The runtime environment automatically loads your code and invokes the request handler you specified. It receives an incoming request and the invocation context as arguments. The context contains additional information about the function parameters.
Cloud Functions automatically captures an application's standard output streams and sends them to the centralized logging system available in Yandex Cloud. This system also logs service records about the start and end of each function and any errors that occur during its execution. For more information about the log format, see Java function runtime logging.
If you want to learn more about how to write in Java or how certain statements work, we recommend taking a basic course on Stepik