Changeset 502
- Timestamp:
- 05/30/08 15:22:21 (7 months ago)
- Files:
-
- Mika/trunk/core-vm/java/java/lang/Runtime.java (modified) (3 diffs)
- Mika/trunk/core-vm/java/wonka/vm/NativeLibrary.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Mika/trunk/core-vm/java/java/lang/Runtime.java
r454 r502 2 2 * Parts copyright (c) 2001, 2002, 2003 by Punch Telematix. All rights * 3 3 * reserved. * 4 * Parts copyright (c) 2004, 2005, 2007 by Chris Gray, /k/ Embedded Java*5 * Solutions. All rights reserved.*4 * Parts copyright (c) 2004, 2005, 2007, 2008 by Chris Gray, /k/ Embedded * 5 * Java Solutions. All rights reserved. * 6 6 * * 7 7 * Redistribution and use in source and binary forms, with or without * … … 475 475 } 476 476 else { 477 throw new UnsatisfiedLinkError("Library '" + libname + "' already loaded"); 477 // HACK HACK HACK 478 // Maybe the existing library is unreachable but we didn't notice, 479 // do GC and try once more before throwing an error. 480 gc(); 481 doLoadedLibrariesHousekeeping(); 482 if (loadedLibraries.get(libname) == null) { 483 loadedLibraries.put(libname, "loading"); 484 } 485 else { 486 throw new UnsatisfiedLinkError("Library '" + libname + "' already loaded"); 487 } 478 488 } 479 489 } … … 518 528 519 529 if (handle != 0) { 520 NativeLibrary nl = new NativeLibrary(handle , cl);530 NativeLibrary nl = new NativeLibrary(handle); 521 531 cl.registerLibrary(nl); 522 532 Mika/trunk/core-vm/java/wonka/vm/NativeLibrary.java
r451 r502 1 1 /************************************************************************** 2 * Copyright (c) 2007 by Chris Gray, /k/ Embedded Java Solutions.*2 * Copyright (c) 2007, 2008 by Chris Gray, /k/ Embedded Java Solutions. * 3 3 * All rights reserved. * 4 4 * * … … 40 40 private int handle; 41 41 42 private ClassLoader loader; 43 44 public NativeLibrary(int handle, ClassLoader loader) { 42 public NativeLibrary(int handle) { 45 43 this.handle = handle; 46 this.loader = loader;47 44 } 48 45
