JEP 330

Jochen Theodorou blackdrag at gmx.org
Sat Jun 2 02:01:59 UTC 2018



Am 31.05.2018 um 18:30 schrieb Cay Horstmann:
[...]
> 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.

Well, for the world before jigsaw: 
http://docs.groovy-lang.org/latest/html/documentation/grape.html if you 
do not mind using Groovy (which supports most Java syntax). Groovy also 
has some shebang support

True, it allows you to make a nice jetty example in a program of 18 
lines, but still I would be surprised if the OpenJDK wants to copy that. 
But for us it solves the problem of downloading dependencies (via ivy), 
making them known to the compiler and then execute the program with a 
modified classloader.

bye Jochen


More information about the compiler-dev mailing list