<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<br>
<blockquote type="cite" cite="mid:CANSoFxsx0ie7KPkAqFEsNCj_tabTuyJbn_twVO9zazp8o7GSog@mail.gmail.com">
<div dir="ltr">
<div class="gmail_quote">
<div>Outside the scope of this JEP, but: a smarter launch
protocol may be useful for reasons beyond on-ramping. For
example, instead of only looking for default constructors,
you could look for a constructor taking an object of type <span style="font-family:monospace">LauchEnvironment</span>,
which is something to be suitably defined.<br>
</div>
</div>
</div>
</blockquote>
<br>
Yes, though we're dipping into that water cautiously. One thing
that this JEP opens up is the ability for abstract classes to
contribute a main method:<br>
<br>
abstract class TestCase { <br>
void main() { runTest(this.getClass()); }<br>
}<br>
<br>
and then any test case becomes launchable:<br>
<br>
class MyTestCase extends TestCase { <br>
// test case<br>
}<br>
<br>
just by running<br>
<br>
java MyTestCase<br>
<br>
This eliminates a whole category of contortions that frameworks have
to provide (or worse, often don't provide) for running a single test
case, service, etc from the command line. <br>
<br>
</body>
</html>