On Monday 23 October 2006 14:15 Pavel Pervov wrote:
> Mikhail,
>
> can relative path be specified in -Dvm.gc_dll/-Dvm.em_dll? If so, the path
> should be extended to represent full path.

So it should be something like

class GCv5Magics {
    static {
        String gcPath = System.getProperty("vm.gc_dll");
        if (gcPath != null) {
            try {
                gcPath = (new File(gcPath)).getCanonicalName();
            } catch (IOException e) {
                System.err.println("Failed to find library specified in 
\"vm.gc_dll\" property: " + e);
                System.loadLibrary("gc");
                return;
            }
            System.load(gcPath);
        }
        else {
            System.loadLibrary("gc");
        }
    }
}

> On 10/21/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote:
> > On 10/21/06, Gregory Shimansky <[EMAIL PROTECTED]> wrote:
> > > 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, I have completely forgotten about System.load() and
> > System.loadLibrary() differences. So the problem is solved and I have
> > even tested the code  :)
> >
> >
> >
> > --
> > Mikhail Fursov

-- 
Gregory Shimansky, Intel Middleware Products Division

Reply via email to