| java.lang.Object jarhack.JarHack
JarHack | public class JarHack (Code) | | JarHack -- this class provides several static methods
that can be used to create .jar and .jad files from a template
Hecl.jar and some user supplied information, such as the output
file, and the name of the new application.
author: David N. Welton version: 1.0 |
Method Summary | |
public static void | createJadForJar(String jarfile, String appname) The createJadForJar method calls createJadForJar
with a url created from the application's name. | public static void | createJadForJar(String jarfile, String appname, String url) The createJadForJar method creates a new .jad file
that matches the .jar file passed to it. | public static void | main(String[] args) main implements a command line version of JarHack
that takes five arguments: 1. | public static void | substHecl(InputStream infile, String outfile, String newname, String scriptfile) The substHecl method takes the filenames of two
.jar's - one as input, the second as output, in addition to the
name of the application. |
createJadForJar | public static void createJadForJar(String jarfile, String appname) throws IOException(Code) | | The createJadForJar method calls createJadForJar
with a url created from the application's name.
Parameters: jarfile - a String value Parameters: appname - a String value exception: IOException - if an error occurs |
createJadForJar | public static void createJadForJar(String jarfile, String appname, String url) throws IOException(Code) | | The createJadForJar method creates a new .jad file
that matches the .jar file passed to it. appname is the name
of the new application.
Parameters: jarfile - a String value Parameters: appname - a String value Parameters: url - a String value exception: IOException - if an error occurs |
main | public static void main(String[] args)(Code) | | main implements a command line version of JarHack
that takes five arguments: 1. The original 'template' .jar
file to use. 2. The destination directory where you want to
create your new application. 3. The name of your new
application as it will appear in the MIDlet. 4. The name of
the Hecl script you want to use instead of the script.hcl that
is included in the 'source' .jar file. 5. The URL where your
jar file will reside.
Parameters: args - a String[] value |
substHecl | public static void substHecl(InputStream infile, String outfile, String newname, String scriptfile) throws IOException(Code) | | The substHecl method takes the filenames of two
.jar's - one as input, the second as output, in addition to the
name of the application. Where it counts, the old name (Hecl,
usually) is overridden with the new name, and the new .jar file
is written to the specified outfile.
Parameters: infile - a FileInputStream value Parameters: outfile - a String value Parameters: newname - a String value exception: IOException - if an error occurs |
|
|