Alex Astapchuk :
Mikhail Fursov :
Pavel,
I do this workaround for my local needs.
The problem in your solution is dll name: gcv5
I can built my own version of GC - gcv5_plus_some_features and put it into
any directory I want (-Dvm.gc_dll ?)
Should I fix the Java sources in this case?

The possible solution could be to set up system property: "-
Dgcv5.my_current_location" and read it from Java, but I see 2 problems:
1) A component (GC) must know its library name
2) "java.library.path" must be modified before the load and restored after the load, because System.loadLibrary is not able to load library with fully
qualified path.

Any other ideas?

Yeap.
The following addresse both your issues.


class GCv5Magics {
     static {
    String gcPath = System.getProperty("vm.gc_dll");
    if (gcPath == null) {


... and the patch already exists... :-)

if (gcPath != null) {


         System.load(gcPath);
    }
    else {
         System.loadLibrary("gc.dll");
System.loadLibrary("gc");

    }
     }
 }




--
Thanks,
  Alex


---------------------------------------------------------------------
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