Java initializer block syntax
Philippe Marschall
philippe.marschall at gmail.com
Tue Oct 9 16:07:08 UTC 2007
2007/10/9, Klaus D. Witzel <klaus.witzel at cobss.com>:
> On Tue, 09 Oct 2007 17:23:54 +0200, Damien Cassou wrote:
>
> > Hi,
> >
> > I discovered that the following syntax is valid Java code:
> >
> > class A {
> >
> > {
> > /* any java code here */
> /* suffixed with .dll and .so for illustration: */
> System.loadLibrary("my.dll");System.load("your.so");
> /* otherwise some of your native methods [might] fail */
> > }
Wouldn't you put this code normally in a static initializer (without
the .so and .dll)?
Cheers
Philippe
> >
> > }
> >
> >
> > This code will be executed just before the constructor. I haven't
> > found any use for this syntax, even in the case of subclasses.
> >
> > Does anyone have any idea or is it just useless?
> >
>
>
>
>
More information about the Squeak-dev
mailing list
|