Skip to content

LibraryLoader

DevTec edited this page Mar 20, 2022 · 1 revision

Downloading file from URL (Require internet connection)

downloadFileFromUrl(String url, String pathFile);

downloadFileFromUrl(String url, File file);

downloadFileFromUrl(URL url, File file);

Loading of jar file

load(File file);

Checking loaded jar

boolean loaded = isLoaded(File file);

Examples

File file = new File("plugins/TheAPI/libraries/mariadb.jar");
if(!file.exists())
  API.library.downloadFileFromUrl("https://github.com/TheDevTec/TheAPI/raw/master/mariadb.jar", file);
if(!API.library.isLoaded(file))
  API.library.load(file);
Clone this wiki locally