Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.io.IOException;

import java.net.URL;

public class Main {
    /**
     * @param url The path to inspect.
     * @return TRUE if the passed URL is contained in a JAR file.
     * @throws IOException
     */
    public static boolean isUrlInJar(URL url) throws IOException {
        return url == null ? false : url.toString().startsWith("jar:");
    }
}