public class Repackager
extends java.lang.Object
| Constructor | Description |
|---|---|
Repackager(java.io.File source) |
| Modifier and Type | Method | Description |
|---|---|---|
protected java.lang.String |
findMainMethod(java.util.jar.JarFile source) |
|
void |
repackage(Libraries libraries) |
Repackage the source file so that it can be run using 'java -jar'.
|
void |
repackage(java.io.File destination,
Libraries libraries) |
Repackage to the given destination so that it can be launched using '
java -jar'.
|
void |
repackage(java.io.File destination,
Libraries libraries,
LaunchScript launchScript) |
Repackage to the given destination so that it can be launched using '
java -jar'.
|
void |
setBackupSource(boolean backupSource) |
Sets if source files should be backed up when they would be overwritten.
|
void |
setLayout(Layout layout) |
Sets the layout to use for the jar.
|
void |
setMainClass(java.lang.String mainClass) |
Sets the main class that should be run.
|
public void setMainClass(java.lang.String mainClass)
mainClass - the main class namepublic void setBackupSource(boolean backupSource)
backupSource - if source files should be backed uppublic void setLayout(Layout layout)
Layouts.forFile(File).layout - the layoutpublic void repackage(Libraries libraries) throws java.io.IOException
libraries - the libraries required to run the archivejava.io.IOException - if the file cannot be repackagedpublic void repackage(java.io.File destination,
Libraries libraries)
throws java.io.IOException
destination - the destination file (may be the same as the source)libraries - the libraries required to run the archivejava.io.IOException - if the file cannot be repackagedpublic void repackage(java.io.File destination,
Libraries libraries,
LaunchScript launchScript)
throws java.io.IOException
destination - the destination file (may be the same as the source)libraries - the libraries required to run the archivelaunchScript - an optional launch script prepended to the front of the jarjava.io.IOException - if the file cannot be repackagedprotected java.lang.String findMainMethod(java.util.jar.JarFile source)
throws java.io.IOException
java.io.IOExceptionCopyright © 2018. All rights reserved.