-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of i2pgit.org:i2p-hackers/i2p.i2p into i2ptunne…
…l-udptunnel
- Loading branch information
Showing
339 changed files
with
22,041 additions
and
17,356 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
apps/addressbook/java/src/net/i2p/addressbook/CommandLine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package net.i2p.addressbook; | ||
|
||
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.55 | ||
*/ | ||
public class CommandLine extends net.i2p.util.CommandLine { | ||
|
||
protected static final List<String> ACLASSES = Arrays.asList(new String[] { | ||
"net.i2p.addressbook.HostTxtParser", | ||
"net.i2p.router.naming.BlockfileNamingService", | ||
"net.metanotion.io.block.BlockFile", | ||
}); | ||
|
||
protected CommandLine() {} | ||
|
||
public static void main(String args[]) { | ||
List<String> classes = new ArrayList<String>(ACLASSES.size() + CLASSES.size()); | ||
classes.addAll(ACLASSES); | ||
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("I2P Address book version " + CoreVersion.VERSION + '\n' + | ||
"USAGE: java -jar /path/to/addressbook.jar command [args]"); | ||
printCommands(classes); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.