From 47b0020704343c2207e310bd251d622fcce10902 Mon Sep 17 00:00:00 2001 From: mkoch Date: Tue, 21 Oct 2003 12:55:02 +0000 Subject: 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72747 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/java/nio/channels/FileChannelImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libjava/java/nio/channels/FileChannelImpl.java') diff --git a/libjava/java/nio/channels/FileChannelImpl.java b/libjava/java/nio/channels/FileChannelImpl.java index 85113a0287b..a14a7e1dd43 100644 --- a/libjava/java/nio/channels/FileChannelImpl.java +++ b/libjava/java/nio/channels/FileChannelImpl.java @@ -47,6 +47,7 @@ import java.io.RandomAccessFile; import java.nio.ByteBuffer; import java.nio.MappedByteBuffer; import java.nio.MappedByteBufferImpl; +import gnu.classpath.Configuration; import gnu.gcj.RawData; /** @@ -59,6 +60,15 @@ import gnu.gcj.RawData; public class FileChannelImpl extends FileChannel { + static + { + // load the shared library needed for native methods. + if (Configuration.INIT_LOAD_LIBRARY) + { + System.loadLibrary ("javanio"); + } + } + public RawData map_address; int length; -- cgit v1.2.3