Linux: Make sure libjawt.so can be loaded

This commit is contained in:
Elias Naur 2005-02-23 11:22:14 +00:00
parent 3085702a38
commit f84e2ceb26
2 changed files with 5 additions and 1 deletions

View File

@ -40,6 +40,10 @@ import java.io.IOException;
* @version $Revision$
*/
class LinuxSysImplementation extends J2SESysImplementation {
static {
java.awt.Toolkit.getDefaultToolkit(); // This will make sure libjawt.so is loaded
}
public boolean openURL(String url) {
// Linux may as well resort to pure Java hackery, as there's no Linux native way of doing it
// right anyway.

View File

@ -63,8 +63,8 @@ public final class Sys {
private final static SysImplementation implementation;
static {
System.loadLibrary(LIBRARY_NAME);
implementation = createImplementation();
System.loadLibrary(LIBRARY_NAME);
String native_version = implementation.getNativeLibraryVersion();
if (!native_version.equals(VERSION))
throw new LinkageError("Version mismatch: jar version is '" + VERSION +