On Saturday 21 October 2006 01:26 Mikhail Fursov wrote:
> On 10/21/06, Gregory Shimansky <[EMAIL PROTECTED]> wrote:
> > I think there is a mistake in the code which Alex wrote (or it would
> > simply throw NPE). It should be
> >
> >   class GCv5Magics {
> >       static {
> >           String gcPath = System.getProperty("vm.gc_dll");
> > -        if (gcPath == null) {
> > +        if (gcPath != null) {
> >               System.load(gcPath);
> >           }
> >           else {
> > -            System.loadLibrary("gc.dll");
> > +            System.loadLibrary("gc");
> >           }
> >       }
> >   }
> >
> > because it makes sense to call System.load only when there is a property
> > specified on the command line and System.loadLibrary in the default
> > case. The same should be done for EM. Or am I missing something?..
>
> Gregory, your fix is right (BTW I have not tried Alex's code yet, if I'd
> try I would rewrite it without copying)
>
> The problem is with fully qualified names for libraries that could be
> provided with
> -Dvm.em_dll option. You can't load it with System.loadLibrary(..) from Java
>
> :(

This is the reason I've corrected the code. Doesn't it mean that is you 
specified something in -Dvm.em_dll on command line that System.getProperty 
would return non null value, and then you shall use System.load instead of 
System.loadLibrary? That is if you change gc to em in the code above.

-- 
Gregory Shimansky, Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to