single-file source-code launcher

The java command's ability to compile a single .java file in memory and run it at once, leaving no class file behind.

In more detail

Running java Hello.java is handy for short scripts and experiments. Nothing is written to disk, so the folder still holds only source files afterwards. It stops being an option once a program has more than one source file to build, and it is not how you ship a service.

Example

java Hello.java

Related terms

Taught in

References