No subject


Wed Dec 19 16:44:34 CET 2007


named
method on the class (this is merely a convenience, so you don't have to
implement
the interface in your script, you can simply just use the appropriate method
name).

Method m = findMethod(scriptClass, "beforePacks");
if (m != null) {
  m.invoke( scriptObject, new Object[] { idata, npacks, progressHandler } );
}


On Dec 22, 2007 11:02 AM, Julien Ponge <julien.ponge at gmail.com> wrote:

> Hi Matthew,
>
> > Is there any interest in this?
>
> Yes, supporting scripting languages is a very appealing feature (be
> it Groovy, Ruby or simply BeanShell). There are 2 things to consider
> in my opinion.
>
> 1. This must be optional when generating the installers as most Java
> dynamic languages runtimes weight at least 1-2Mb each.
>
> 2. I would favor an approach where scripts are referenced rather than
> included in XML CDATA constructs (think of IDE support for instance).
>
> Cheers
> _______________________________________________
> izpack-users mailing list
> izpack-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/izpack-users
>

------=_Part_119_4448948.1198867598352
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Yes, i agree on point #1.&nbsp; However, i&#39;m a little unsure of how we could force the compiler<br>to package up something like the groovy/ruby/beanshell jars into the installer if someone<br>used that installer listener.&nbsp; I guess a corresponding compiler listener might be the appropriate
<br>place, but i&#39;m not sure.&nbsp; I can very easily supply code which would integrate the groovy<br>script language (the bindings are very easy to do).&nbsp; It&#39;s the IzPack glue itself that would<br>take me the most time (as i assume would be the case with other dynamic scripting
<br>languages as well).<br><br>GroovyClassLoader classLoader = new GroovyClassLoader(this.class.getClassLoader());<br>Class scriptClass = classLoader.parseClass(new InputStream(scriptInputStream));<br>Object scriptObject = 
scriptClass.newInstance();<br><br>


More information about the izpack-users mailing list