Java ClassLoader Load getTomcatBinaryDistribution()

Here you can find the source of getTomcatBinaryDistribution()

Description

Returns URL to get Tomcat binary distribution.

License

Open Source License

Declaration

static URL getTomcatBinaryDistribution() throws IOException 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2012-2015 Codenvy, S.A.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:/*from   w w w  .j  a v  a  2 s .  c  o  m*/
 *   Codenvy, S.A. - initial API and implementation
 *******************************************************************************/

import java.io.IOException;
import java.net.URL;

public class Main {
    /** Returns URL to get Tomcat binary distribution. */
    static URL getTomcatBinaryDistribution() throws IOException {

        URL tomcatDistributionUrl = Thread.currentThread().getContextClassLoader().getResource("sdk-tomcat.zip");
        if (tomcatDistributionUrl == null) {
            throw new IOException("Unable to get Tomcat binary distribution.");
        }
        return tomcatDistributionUrl;
    }
}

Related

  1. getStream(final File file)
  2. getStreamForString(String source)
  3. getSystemPath(String inPath)
  4. getTestDir(final String name)
  5. getTestJson()
  6. getVolFile(String fileName)