JEP 330

Cay Horstmann cay.horstmann at sjsu.edu
Thu May 31 16:30:56 UTC 2018


Hi Rémi,

> The JEP also said that it simplify the writing of small utility scripts  > and  i think it is its major selling point.> There are a lot of 
scripts (bootstrap, build, deployment, continuous > testing scripts, 
etc) that should be written in Java instead of being > written in shell 
because Java is cross platform.
I actually have a bunch of scripts that I wrote in Java (and then call 
from a shell script or alias). But the "single file" thing isn't as 
useful as it appears at first. Most of my scripts depend on some JAR 
(JavaMail, Commons CSV, ...).

With a Python script, you use pip to manage those dependencies, and in 
the script you just import them. In Java, the best I can do is rely on 
Maven/Ivy.

Suppose I have a Java script that uses JavaMail and I want to give it to 
a colleague. Let's assume that the colleague knows how to fetch the 
dependencies into the Ivy cache. What would the shebang line look like? 
A classpath into ~/.ivy2??? I don't know how to do that cross platform.

Now THAT would be a great problem to solve in the launcher.

Cheers,

Cay


-- 

Cay S. Horstmann | http://horstmann.com | mailto:cay at horstmann.com


More information about the compiler-dev mailing list