From a40566eefbc84ee01492b325c7664855466f012f Mon Sep 17 00:00:00 2001 From: kytv <kytv@mail.i2p> Date: Sun, 30 Dec 2012 00:36:14 +0000 Subject: [PATCH] improve installer javadocs; add minimalist package.html --- installer/java/src/net/i2p/installer/Copy.java | 6 ++++-- installer/java/src/net/i2p/installer/Delete.java | 7 +++++-- installer/java/src/net/i2p/installer/Exec.java | 10 ++++++---- installer/java/src/net/i2p/installer/FixWinPaths.java | 11 ++++++++--- installer/java/src/net/i2p/installer/package.html | 5 +++++ 5 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 installer/java/src/net/i2p/installer/package.html diff --git a/installer/java/src/net/i2p/installer/Copy.java b/installer/java/src/net/i2p/installer/Copy.java index 49fa2c6d6a..500db1deeb 100644 --- a/installer/java/src/net/i2p/installer/Copy.java +++ b/installer/java/src/net/i2p/installer/Copy.java @@ -3,9 +3,11 @@ package net.i2p.installer; import net.i2p.util.FileUtil; /** - * Usage: Copy from to + * <p>This class is used by the installer to copy files.</p> + * Usage: <code>Copy [FROM] [TO]</code><br> * - * only for use by installer + * See also: {@link net.i2p.util.FileUtil#copy FileUtil.copy()}. + * @since 0.4.1.4, moved to {@link net.i2p.installer} in 0.9.5 */ public class Copy { public static void main(String args[]) { diff --git a/installer/java/src/net/i2p/installer/Delete.java b/installer/java/src/net/i2p/installer/Delete.java index afc9f78a90..01498300f7 100644 --- a/installer/java/src/net/i2p/installer/Delete.java +++ b/installer/java/src/net/i2p/installer/Delete.java @@ -3,10 +3,13 @@ package net.i2p.installer; import net.i2p.util.FileUtil; /** - * Usage: Delete name + * <p>This class is used by the installer to delete one or more specified files.</p> + * Usage: <code>Delete <u>FILE</u> ...</code><br> * - * only for use by installer + * See also: {@link net.i2p.util.FileUtil#rmdir FileUtil.rmdir()}. + * @since 0.4.1.4, moved to {@link net.i2p.installer} in 0.9.5 */ + public class Delete { public static void main(String args[]) { for(int file=0; file < args.length; file++) diff --git a/installer/java/src/net/i2p/installer/Exec.java b/installer/java/src/net/i2p/installer/Exec.java index 83d9accce3..b8488ceff2 100644 --- a/installer/java/src/net/i2p/installer/Exec.java +++ b/installer/java/src/net/i2p/installer/Exec.java @@ -3,9 +3,11 @@ package net.i2p.installer; import java.io.File; /** - * Usage: Exec dir command [args ...] + * <p>This class can be used by the installer to execute shell commands.</p> + * Usage: <code>Exec dir command [args ...]</code><br> * - * only for use by installer + * See also {@link net.i2p.util.ShellCommand}. + * @since 0.4.1.4, moved to {@link net.i2p.installer} in 0.9.5 */ public class Exec { public static void main(String args[]) { @@ -17,8 +19,8 @@ public class Exec { // ugly hack, because it seems we'll block otherwise! // http://cephas.net/blog/2004/03/23/external_applications_javas_runtimeexec.html try { proc.exitValue(); } catch (Throwable t) { } - Runtime.getRuntime().halt(0); - + Runtime.getRuntime().halt(0); + } catch (Exception e) { e.printStackTrace(); } diff --git a/installer/java/src/net/i2p/installer/FixWinPaths.java b/installer/java/src/net/i2p/installer/FixWinPaths.java index 4b32eaa0f0..5894eb9348 100644 --- a/installer/java/src/net/i2p/installer/FixWinPaths.java +++ b/installer/java/src/net/i2p/installer/FixWinPaths.java @@ -12,9 +12,14 @@ import java.io.PrintStream; /** - * Usage: FixWinPaths WrapperConfigFile - * - * only for use by installer + * <p>This class is used by the installer in Windows to process the <code>wrapper.config</code> file. It + * <ul> + * <li>rewrites the applicable wrapper config options to point to <code>%APPDATA%\I2P</code></li> + * <li>corrects the paths, rewriting <code>/</code> to <code>\</code></li> + * </ul> + * </p> + * Usage: <code>FixWinPaths [WrapperConfigFile]</code> + * @since 0.9.5 */ public class FixWinPaths{ public static void main(String args[]) { diff --git a/installer/java/src/net/i2p/installer/package.html b/installer/java/src/net/i2p/installer/package.html new file mode 100644 index 0000000000..f1e5911adb --- /dev/null +++ b/installer/java/src/net/i2p/installer/package.html @@ -0,0 +1,5 @@ +<html><body> +<p> +These classes make up the "Helper Utilities" that are used by the installer. +</p> +</body></html> -- GitLab