public class AutoClientJar extends Object
| Modifier and Type | Field and Description |
|---|---|
static String | FILENAMEThe file name "auto-client.jar". |
| Constructor and Description |
|---|
AutoClientJar(File dir)Constructor used when only directory is available. |
AutoClientJar(PhantomRuntime runtime)Creates the instance for a runtime. |
| Modifier and Type | Method and Description |
|---|---|
static void | addDefaultSettings(IniFile ini, boolean on, LinkedHashSet<String> dirSpec)Adds default settings to an INI file. |
boolean | builderCreateJarIfRequired(IProgressMonitor monitor)Creates the Jar file if required. |
void | createJar(LinkedHashMap<String,File> files, IProgressMonitor monitor)Creates the Jar file with the specified files. |
File | findDirectoryForImage(String path)From the path specification of an image file, find a file directory. |
File | getClientJarFile()Gets the file for the Client Jar. |
String[] | getDirSpecs()Gets the directory specification entries. |
static String[] | getDirSpecs(IniFile ini)Gets the directory specification entries. |
LinkedHashMap<String,File> | getFiles(String[] dirSpecs)Gets the list of required files in the Jar. |
boolean | isEnabled()Checks if the "auto-client.jar" file is enabled. |
static boolean | isEnabled(IniFile ini)Checks if the "auto-client.jar" file is enabled. |
boolean | needsCreate(LinkedHashMap<String,File> files, IProgressMonitor monitor)Checks for requirement to create the Jar file. |
static void | replaceJarWithAutoClientJar(File jarFile, File destDir, boolean deleteOrRenameAfterExtract, File newName, LinkedHashSet<String> autoJarDirSpecs, IProgressMonitor monitor)Replaces a Jar file with Auto-Client Jar. |
public static final String FILENAME
public AutoClientJar(PhantomRuntime runtime)
public AutoClientJar(File dir)
public static void addDefaultSettings(IniFile ini, boolean on, LinkedHashSet<String> dirSpec)
ini - The INI file.on - Flag for enablement.dirSpec - Directory specification or null for default: each item as SRC=DEST, DEST=/ means root (empty strings not allowed). An item could also be just SRC, meaning SRC=DEST where DEST and SRC are equal (will be converted to SRC=SRC).public boolean isEnabled()
public static boolean isEnabled(IniFile ini)
public String[] getDirSpecs() throws IOException
IOException - for invalid entries.public static String[] getDirSpecs(IniFile ini) throws IOException
IOException - for invalid entries.public File getClientJarFile()
public LinkedHashMap<String,File> getFiles(String[] dirSpecs) throws IOException
dirSpecs - The directory specification array. Each entry MUST contain a '='.IOException - In case of file structure mismatch.public boolean needsCreate(LinkedHashMap<String,File> files, IProgressMonitor monitor)
files - The files that should be in the Jar.monitor - A progress monitor, or null for none.public boolean builderCreateJarIfRequired(IProgressMonitor monitor) throws IOException, CancelException
IOExceptionCancelExceptionpublic void createJar(LinkedHashMap<String,File> files, IProgressMonitor monitor) throws IOException, CancelException
IOExceptionCancelExceptionpublic File findDirectoryForImage(String path)
public static void replaceJarWithAutoClientJar(File jarFile, File destDir, boolean deleteOrRenameAfterExtract, File newName, LinkedHashSet<String> autoJarDirSpecs, IProgressMonitor monitor) throws IOException
jarFile - The Jar file to process.destDir - Destination directory for extracted files.deleteOrRenameAfterExtract - Deletes or renames the Jar file after extraction.newName - The new name of the Jar file, null will delete the file.autoJarDirSpecs - The current directory specifications.monitor - The progress monitor.IOException - For Jar file errors.Phantom® and NetPhantom® are registered trademarks of Mindus SARL.
© 2026 Mindus SARL. All rights reserved.