equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
22 * or visit www.oracle.com if you need additional information or have any |
22 * or visit www.oracle.com if you need additional information or have any |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package sun.nio.fs; |
26 package sun.nio.fs; |
27 |
|
28 import java.security.AccessController; |
|
29 import java.security.PrivilegedAction; |
|
30 |
27 |
31 /** |
28 /** |
32 * Linux specific system calls. |
29 * Linux specific system calls. |
33 */ |
30 */ |
34 |
31 |
119 |
116 |
120 // initialize |
117 // initialize |
121 private static native void init(); |
118 private static native void init(); |
122 |
119 |
123 static { |
120 static { |
124 AccessController.doPrivileged(new PrivilegedAction<>() { |
121 jdk.internal.loader.BootLoader.loadLibrary("nio"); |
125 public Void run() { |
|
126 System.loadLibrary("nio"); |
|
127 return null; |
|
128 }}); |
|
129 init(); |
122 init(); |
130 } |
123 } |
131 } |
124 } |