Re:1JPM: A Maven/Gradle alternative in a single Java file
by grishka on Monday July 08, 2024 @11:56PM
(#40912408)
It technically compiles it to memory before running it, but the point is that you don't have to invoke javac first. It's a relatively new feature.
[ Parent
| on HN ]
Re:1JPM: A Maven/Gradle alternative in a single Java file
by metadat on Monday July 08, 2024 @11:58PM
(#40912419)
Do you know for which Java version this first became available?
Re:1JPM: A Maven/Gradle alternative in a single Java file
by grishka on Tuesday July 09, 2024 @12:03AM
(#40912444)
11: https://openjdk.org/jeps/330
Oh so actually, you can use a shebang, just without the .java extension and with the "--source" flag, it's specifically written out in that spec. I was doing my experiment wrong!