RFR: 8340133: Investigate if the java launcher could give hints about JShell [v2]

Magnus Ihse Bursie ihse at openjdk.org
Wed Oct 16 07:49:17 UTC 2024


On Wed, 16 Oct 2024 01:30:10 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> src/java.base/share/classes/sun/launcher/resources/launcher.properties line 241:
>> 
>>> 239: \  -jar <jar-file.jar>        to execute the main class in a JAR archive\n\
>>> 240: \  -m <module>[/<MainClass>]  to execute the main class of a module\n\
>>> 241: \  <SourceFile.java>          to compile and execute a single-file program\n\n\
>> 
>> Suggestion:
>> 
>> \  <SourceFile>.java          to compile and execute a single-file program\n\n\
>
> Or even `<MainClass>.java` to pair with `<MainClass>`

That might not be the case in the future, if the file uses an "unnamed class" (https://openjdk.org/projects/amber/design-notes/on-ramp).

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21411#discussion_r1802534965


More information about the core-libs-dev mailing list