JDK 11부터 자바를 직접 실행할 수 있는 방법과 JDK 22의 다중 파일 지원에 대해 설명합니다.
JDK 11부터 사용자는 자바 소스 파일을 직접 실행할 수 있습니다. 중간 컴파일 단계 없이, <code>java</code> 런처가 이를 처리합니다. JDK 22에서는 다중 파일 프로그램도 지원됩니다. 이 기사는 이 기능이 어떻게 작동하는지, 사용할 때와 문제점에 대해 설명합니다.
Discusses how Java can be run directly from source since JDK 11, including multi-file support in JDK 22.
Starting with JDK 11, users can run Java source files directly without a separate compilation step. The <code>java</code> launcher manages the compilation behind the scenes. As of JDK 22, this feature supports multi-file programs as well. This article walks through how it works, when to use it, and its limitations.