|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hecl.jarhack.JarHack
public class JarHack
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.
Constructor Summary | |
---|---|
JarHack()
|
Method Summary | |
---|---|
static void |
createJadForJar(java.lang.String jarfile,
java.lang.String appname)
The createJadForJar method calls createJadForJar
with a url created from the application's name. |
static void |
createJadForJar(java.lang.String jarfile,
java.lang.String appname,
java.lang.String url)
The createJadForJar method creates a new .jad file
that matches the .jar file passed to it. |
static void |
main(java.lang.String[] args)
main implements a command line version of JarHack
that takes five arguments: 1. |
static void |
substHecl(java.io.InputStream infile,
java.lang.String outfile,
java.lang.String newname,
java.lang.String iconname,
java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JarHack()
Method Detail |
---|
public static void substHecl(java.io.InputStream infile, java.lang.String outfile, java.lang.String newname, java.lang.String iconname, java.lang.String scriptfile) throws java.io.IOException
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. Via the iconname argument
it is also possible to specify a new icon file to use.
infile
- a FileInputStream
valueoutfile
- a String
valuenewname
- a String
valueiconname
- a String
value
java.io.IOException
- if an error occurspublic static void createJadForJar(java.lang.String jarfile, java.lang.String appname) throws java.io.IOException
createJadForJar
method calls createJadForJar
with a url created from the application's name.
jarfile
- a String
valueappname
- a String
value
java.io.IOException
- if an error occurspublic static void createJadForJar(java.lang.String jarfile, java.lang.String appname, java.lang.String url) throws java.io.IOException
createJadForJar
method creates a new .jad file
that matches the .jar file passed to it. appname is the name
of the new application.
jarfile
- a String
valueappname
- a String
valueurl
- a String
value
java.io.IOException
- if an error occurspublic static void main(java.lang.String[] args) throws org.apache.commons.cli.ParseException
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.
args
- a String[]
value
org.apache.commons.cli.ParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |