Here you can find the source of getLocalFile(final String aLocalPath)
Parameter | Description |
---|---|
aLocalPath | The path to the file which should be loaded. |
public static File getLocalFile(final String aLocalPath)
//package com.java2s; //License from project: Open Source License import java.io.File; import java.net.URISyntaxException; public class Main { /**//from w w w . j ava 2 s .c om * @param aLocalPath * The path to the file which should be loaded. * @return The local file. */ public static File getLocalFile(final String aLocalPath) { try { return new File(ClassLoader.getSystemResource("").toURI().getPath(), aLocalPath); } catch (final URISyntaxException uiUriSyntaxException) { throw new IllegalStateException("This is a critical error. Please report it.", uiUriSyntaxException); } } }