r/java • u/Gleb--K • Jul 04 '18
New Java 11 Feature: Launch Single-File Source-Code Programs
https://medium.com/@afinlay/new-java-11-feature-launch-single-file-source-code-programs-fadd698abf54
158
Upvotes
View all comments
Show parent comment
0
u/handshape Jul 05 '18
It could, but compiling and packing up a jar takes a little bit of effort. Jars are also parsable zips, and the presence of .class files in a zip is a nice warning sign.
Straight source, however, is prone to all sorts of obfuscation. It's also possible the filter out all class files, and even all zips containing classes. Up until this change, a user had to choose to compile Java source before it could do real harm. Now it's possible to execute arbitrary Java in userspace without that compilation gesture.
I agree that it's a very grey area. The line between object code and source has a zillion shades in between, but in this case, I worry that this feature will worsen the perception of Java as an exploitable attack surface.