When I am trying to select Java 8 as the runtime for my AWS Lambda function, it shows:
The code editor does not support the Java 8 runtime.
As per the docs, the inline editor is not supported for the Java runtime on AWS Lambda.
Since Java is a compiled language, you can't view or edit the source code in the Lambda console, but you can modify its configuration, invoke it, and configure triggers.