You can use AWS Serverless Application Model (AWS SAM) to create application locally and deploy it to AWS.
AWS SAM CLI allows to create applications for a wide range of Lambda runtimes (Java/.NET/NodeJS/Python/Go/Ruby).
sam init -r java11, for example, will guide you through creating a new Java11 application from an AWS Quick Start Template or a custom one, if you have any. If you choose to use an AWS provided Quick start application (e.g.
sam init --name java11-demo-app --runtime java11 --dependency-manager gradle --app-template hello-world) will have
template.yaml file created for you, so that you can just build and deploy the demo app without writing any code.
You can use Java. You should look into provisioned concurrency as well to avoid cold start problems. I don't use Java with Lambda so I can't be of much more help beyond these links:
How to create lambda function with nodejs from cloudformation inline?Accepted Answerasked a year ago
AWS cli - List all the deprecated lambda runtime
Change CodeBuild Image for AWS Lambda Applications
Setup lambda notification alert for deprecated runtime
AWS Lambda NodeJS compatibility issues.asked 8 months ago
AWS Lambda Applications and NodeJS
Cloudwatch - console.log vs console.dir (nodejs lambda)asked 5 months ago
YAML_FILE_ERROR Message: Unknown runtime version named '12' of nodejsasked 2 years ago
lambda import layer in nodejsasked 17 days ago
AWS Lambda Application Runtime LimitationsAccepted Answerasked 2 years ago