JDKのClassLoaderHelperには、使用を持っていません

user7294900:

ClassLoaderHelperは意味がありません

class ClassLoaderHelper {
    private ClassLoaderHelper() {}
    static File mapAlternativeName(File lib) {
        return null;
    }

私はのために任意の用途見つかりませんでしたmapAlternativeName(静的)を上書きすることができないが

また、コメントは何の本当の意味を持っていません

/**
 * Returns an alternate path name for the given file
 * such that if the original pathname did not exist, then the
 * file may be located at the alternate location.
 * For most platforms, this behavior is not supported and returns null.
 */

それは、以前のバージョンまたは将来の使用のためにだけ指定するヘルパークラスからちょうど残り物ですか?

EDIT

私は、関連するバグ発見(解像度:未解決の)JDK-7157665:すべてのネイティブライブラリの負荷のために使用ClassLoaderHelper

System.load()が呼び出された - 非ブートストラップクラスローダが使用されていると - すなわち:7134701ネイティブライブラリがロードされている他のコードパスで同じ変更を行うために更新する必要があるため修正

これらの両方の場合では、絶対パス名が提供されていますが、(Mac上で)私たちは、最初に元のファイルをロードしようとすべきであり、元の名前が*であれば、Mac上で、アップルのJDK 6との互換性のために、私たちは.jnilibバリアントを探す必要があります。 dylib、それは見つかりませんでした。

user7294900:

私はJavaの12のソースをダウンロードして、クラスが変更されたことが判明し、追加の定数:

/**
 * Indicates, whether PATH env variable is allowed to contain quoted entries.
 */
static final boolean allowsQuotedPathElements = true;

そして、それはで使用されていますClassLoader

if (ClassLoaderHelper.allowsQuotedPathElements && ...

だから、このクラスを削除することはできません(それはクラスローダのためのヘルパークラスを指定しています)

おすすめ

転載: http://43.154.161.224:23101/article/api/json?id=226647&siteId=1