equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008, 2011, 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 |
25 |
25 |
26 package sun.nio.fs; |
26 package sun.nio.fs; |
27 |
27 |
28 import java.nio.file.*; |
28 import java.nio.file.*; |
29 import java.io.IOException; |
29 import java.io.IOException; |
30 import java.security.AccessController; |
|
31 import java.security.PrivilegedAction; |
|
32 |
30 |
33 /** |
31 /** |
34 * File type detector that does lookup of file extension using Windows Registry. |
32 * File type detector that does lookup of file extension using Windows Registry. |
35 */ |
33 */ |
36 |
34 |
68 } |
66 } |
69 |
67 |
70 private static native String queryStringValue(long subKey, long name); |
68 private static native String queryStringValue(long subKey, long name); |
71 |
69 |
72 static { |
70 static { |
73 AccessController.doPrivileged(new PrivilegedAction<Void>() { |
71 // nio.dll has dependency on net.dll |
74 @Override |
72 jdk.internal.loader.BootLoader.loadLibrary("net"); |
75 public Void run() { |
73 jdk.internal.loader.BootLoader.loadLibrary("nio"); |
76 // nio.dll has dependency on net.dll |
|
77 System.loadLibrary("net"); |
|
78 System.loadLibrary("nio"); |
|
79 return null; |
|
80 }}); |
|
81 } |
74 } |
82 } |
75 } |