I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit a7a0ca87 authored by zzz's avatar zzz
Browse files

Branch from 0.9.5 release.

Implement new Main wrapper class for utility.jar, to
work around izpack ticket #162 http://jira.codehaus.org/browse/IZPACK-162
which prevents us from specifying a main class as it fails on
Windows installations when a full path including a drive letter is specified
(ticket #912)
parent 9b0c4815
No related branches found
No related tags found
No related merge requests found
......@@ -49,6 +49,7 @@
<fileset dir="../../core/java/build/obj" includes="**/FileUtil.class"/>
<fileset dir="./build/obj" includes="**" />
<manifest>
<attribute name="Main-Class" value="net.i2p.installer.Main" />
<attribute name="Built-By" value="${build.built-by}" />
<attribute name="Build-Date" value="${build.timestamp}" />
<attribute name="Base-Revision" value="${workspace.version}" />
......
package net.i2p.installer;
/**
* <p>
* Execute one of the other classes in this package.
* Workaround for izpack bug #162 / our bug #912
* http://jira.codehaus.org/browse/IZPACK-162
* http://trac.i2p2.i2p/ticket/912
* </p>
* Usage: <code>copy|delete|exec|fixwinpaths args...</code><br>
*
* @since 0.9.6
*/
public class Main {
private static final String USAGE = "Usage: {copy|delete|exec|fixwinpaths} [args...]";
public static void main(String args[]) {
if (args.length == 0)
throw new IllegalArgumentException(USAGE);
String cmd = args[0];
String[] shift = new String[args.length - 1];
if (shift.length > 0)
System.arraycopy(args, 1, shift, 0, shift.length);
if (cmd.equals("copy"))
Copy.main(shift);
else if (cmd.equals("delete"))
Delete.main(shift);
else if (cmd.equals("exec"))
Exec.main(shift);
else if (cmd.equals("fixwinpaths"))
FixWinPaths.main(shift);
else
throw new IllegalArgumentException(USAGE);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment