From c4ff410a6ba8420e1f8083a779b0ed57014e7d1c Mon Sep 17 00:00:00 2001 From: Michael Koch Date: Tue, 21 Oct 2003 12:55:02 +0000 Subject: ByteOrder.java, [...]: Add code to load library with code for native methods if needed. 2003-10-21 Michael Koch * java/nio/ByteOrder.java, java/nio/DirectByteBufferImpl.java, java/nio/channels/FileChannelImpl.java: Add code to load library with code for native methods if needed. From-SVN: r72747 --- libjava/java/nio/ByteOrder.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libjava/java/nio/ByteOrder.java') diff --git a/libjava/java/nio/ByteOrder.java b/libjava/java/nio/ByteOrder.java index f1001a33b71..b4fcbe53a8b 100644 --- a/libjava/java/nio/ByteOrder.java +++ b/libjava/java/nio/ByteOrder.java @@ -38,6 +38,8 @@ exception statement from your version. */ package java.nio; +import gnu.classpath.Configuration; + /** * @author Michael Koch * @since 1.4 @@ -47,6 +49,15 @@ public final class ByteOrder public static final ByteOrder BIG_ENDIAN = new ByteOrder(); public static final ByteOrder LITTLE_ENDIAN = new ByteOrder(); + static + { + // load the shared library needed for native methods. + if (Configuration.INIT_LOAD_LIBRARY) + { + System.loadLibrary ("javanio"); + } + } + /** * Returns the native byte order of the platform currently running. */ -- cgit v1.2.3