Package org.panda_lang.pandomium.util
Class JarUtils
java.lang.Object
org.panda_lang.pandomium.util.JarUtils
public class JarUtils extends Object
- Author:
- Osiris-Team
-
Constructor Summary
Constructors Constructor Description JarUtils() -
Method Summary
Modifier and Type Method Description StringfindVersion(File file)@NotNull PropertiesgetPandoniumPropertiesFromJar(@NotNull String path)@NotNull PropertiesgetPropertiesFromJar(@NotNull String path, String propertiesFileName)This creates an URLClassLoader so we can access the autoplug.properties file inside the jar and then returns the properties file.@NotNull PropertiesgetThisJarsPandoniumProperties()FilesearchFileRecursively(String fileName, File file)
-
Constructor Details
-
JarUtils
public JarUtils()
-
-
Method Details
-
getThisJarsPandoniumProperties
- Throws:
Exception
-
getPandoniumPropertiesFromJar
@NotNull public @NotNull Properties getPandoniumPropertiesFromJar(@NotNull @NotNull String path) throws Exception- Throws:
Exception
-
getPropertiesFromJar
@NotNull public @NotNull Properties getPropertiesFromJar(@NotNull @NotNull String path, String propertiesFileName) throws ExceptionThis creates an URLClassLoader so we can access the autoplug.properties file inside the jar and then returns the properties file.- Parameters:
path- The jars pathpropertiesFileName- Properties file name without its .properties extension.- Returns:
- autoplug.properties
- Throws:
Exception
-
findVersion
- Throws:
IOException
-
searchFileRecursively
- Throws:
IOException
-