Java ClassLoader Load getAbsolutePath(String file)

Here you can find the source of getAbsolutePath(String file)

Description

get Absolute Path

License

Open Source License

Declaration

public static String getAbsolutePath(String file)
            throws URISyntaxException 

Method Source Code

//package com.java2s;
/*/*from  www  . jav a2  s  .co m*/
 * Copyright (C) 2016 Netflix, Inc.
 *
 *     This file is part of IMF Conversion Utility.
 *
 *     IMF Conversion Utility is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     IMF Conversion Utility is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU General Public License for more details.
 *
 *     You should have received a copy of the GNU General Public License
 *     along with IMF Conversion Utility.  If not, see <http://www.gnu.org/licenses/>.
 */

import java.io.File;
import java.net.URISyntaxException;

public class Main {
    public static String getAbsolutePath(String file)
            throws URISyntaxException {
        return new File(getImpFolder(), file).getAbsolutePath();
    }

    public static File getImpFolder() throws URISyntaxException {
        //noinspection ConstantConditions
        return new File(ClassLoader.getSystemClassLoader()
                .getResource("imp").toURI());
    }
}

Related

  1. get(final String key, final String filename)
  2. getAbsoluteBasePath()
  3. getAbsolutePathEssenceDesc(String file)
  4. getAllArquillianLibs()
  5. getAsProperties(final String name)
  6. getBaseDir()