Java Code Examples for sun.net.www.ParseUtil#fileToEncodedURL()

The following examples show how to use sun.net.www.ParseUtil#fileToEncodedURL() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SerialVer.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 2
Source File: SerialVer.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 3
Source File: SerialVer.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 4
Source File: SerialVer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 5
Source File: SerialVer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 6
Source File: URLClassPath.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Returns a file URL for the given file path.
 */
private static URL toFileURL(String s) {
    try {
        File f = new File(s).getCanonicalFile();
        return ParseUtil.fileToEncodedURL(f);
    } catch (IOException e) {
        return null;
    }
}
 
Example 7
Source File: SerialVer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 8
Source File: SerialVer.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 9
Source File: SerialVer.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 10
Source File: SerialVer.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 11
Source File: SerialVer.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 12
Source File: SerialVer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}
 
Example 13
Source File: SerialVer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
static void initializeLoader(String cp)
                            throws MalformedURLException, IOException {
    URL[] urls;
    StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
    int count = st.countTokens();
    urls = new URL[count];
    for (int i = 0; i < count; i++) {
        urls[i] = ParseUtil.fileToEncodedURL(
            new File(new File(st.nextToken()).getCanonicalPath()));
    }
    loader = new URLClassLoader(urls);
}