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

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

i2psnark: Add CommandLine to jar

parent 6a71c23f
Branches
Tags
No related merge requests found
......@@ -70,7 +70,7 @@
<property name="workspace.changes.tr" value="" />
<jar destfile="./build/i2psnark.jar" basedir="./build/obj" includes="**/*.class" excludes="**/web/* **/messages_*.class">
<manifest>
<attribute name="Main-Class" value="org.klomp.snark.Snark" />
<attribute name="Main-Class" value="org.klomp.snark.CommandLine" />
<attribute name="Class-Path" value="i2p.jar mstreaming.jar streaming.jar" />
<attribute name="Implementation-Version" value="${full.version}" />
<attribute name="Built-By" value="${build.built-by}" />
......
package org.klomp.snark;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import net.i2p.CoreVersion;
/**
* Simple command line access to various utilities.
* Not a public API. Subject to change.
* Apps and plugins should use specific classes.
*
* @since 0.9.26
*/
public class CommandLine extends net.i2p.util.CommandLine {
protected static final List<String> SCLASSES = Arrays.asList(new String[] {
"org.klomp.snark.MetaInfo",
//"org.klomp.snark.Snark",
//"org.klomp.snark.StaticSnark",
"org.klomp.snark.Storage",
"org.klomp.snark.bencode.BDecoder",
//"org.klomp.snark.web.RunStandalone",
});
protected CommandLine() {}
public static void main(String args[]) {
List<String> classes = new ArrayList<String>(SCLASSES.size() + CLASSES.size());
classes.addAll(SCLASSES);
classes.addAll(CLASSES);
if (args.length > 0) {
exec(args, classes);
}
usage(classes);
System.exit(1);
}
private static void usage(List<String> classes) {
System.err.println("I2PSnark version " + CoreVersion.VERSION + '\n' +
"USAGE: java -jar /path/to/i2psnark.jar command [args]");
printCommands(classes);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment