The most current readme.html file is on our web site
JCloak displays progress messages when the verify switch is turned on (-v
JCloak may also display error or warning messages, with or without verbose prints. The GUI will keep error and warning messages in a log that can be viewed from the menu item 'View | Show Errors'.
ERR: '<name>' load failed. (is super-class of '<dc-name>',
error: <reason>)
<name>
. The class is
the super-class of <dc-name>
. <reason>
is the error JCloak got trying to find or load the class <name>.
JCloak cannot obfuscate classes that do not have a complete derivation tree. You must make the missing class available on the obfuscation classpath.
ERR: '<name>' load failed. (is super-interface of '<dc-name>',
error: <reason>)
<name>
. The class is
the super-interface of <dc-name>
. <reason>
is the error JCloak got trying to find or load the class <name>.
JCloak cannot obfuscate classes that do not have a complete derivation tree. You must make the missing class available on the obfuscation classpath.
WARN: Class "<class-name>" contains invalid reference to
"<refd-class>.<signature>"
<class-name>
references
the method or field <signature>
in class <refd-class>
and JCloak cannot resolve the reference. Note that when obfuscating code that
is cleanly compiled in a single compilation JCloak will never report this
error. This error is usually caused by:
Class "public class C09" contains invalid reference to "public
class Java2Demo.pLjavax/swing/J TabbedPane;"
<signature>
unless the reference
can be resolved.
WARN: class load failed for reference, '<class>.<signature>'
ref. from '<ref-class>', error: <reason>
<class>
because the class
<ref-class> referenced the method or field <sig>
in <class>
. The class load failed for the indicated <reason>
.
<signature>
unless the class
can be loaded.WARN: '<class>' already loaded from '<classpath>' ignoring
'<classfilepath>'
Can't find class '<name>' on classpath "<classpath-list>"
ignored '<name>', from classpath '<path>', Reason:
Class corrupted, invalid UTF8 String
'<name>' package not valid with path '<class-file>'
and classpath '<path>'
When you specify a classpath as the initial classpath for JCloak to scan for classes, either via a class file or the subdirectory. JCloak will ignore any invalid class files found, that is, class files that do not belong on the classpath. In addtion, if JCloak encounters a sub-path that has only invalid class files it will ignore all sub-paths beneath that path as well.
JCloak uses a considerable amount of Java heap, especially when removing unreferenced classes. If you use the windows executeable launchers the memory size is automatically set to the free physical memory. Use the java option '-Xmx128M' to set the max heap memory size to 128MB. So for example to run JCloak with 128M max heap:
java -Xmx128M -jar JCloak.jar [jcloak options]
JCloak command line includes two options for tracing. Class trace, '-c
The verify switch '-v' also takes an level argument, -v0 is basic trace, -v1 traces more, -v2 reams of output.
The Verify command line utility class is now included with JCloak. Verify checks that all references made by a set of classes can be statisfied. The usage is:
usage: java Verify [-v] [-java2] [-cp <classpath>] <directory> |
Verify loads every class found on the target classpath <directory> or in the target jar file <jar-file> and scans the bytecode in the class for references. For each reference Verify will load the referenced class and verify the referenced symbol exists.
Verify looks for referenced classes on the environment CLASSPATH or, if -java2 is specified, on the CLASSPATH environment and in the Java 2 runtime rt.jar. You can specify additional classpaths in a list <classpath> with the -cp argument.
The -v argument enables verbose trace prints.
For example, here is the output when Verify is run on JCloak itself:
C:\JCloak>java -cp c:\jcloak\JCloak.jar Verify .\JCloak.jar
Start time: Thu Mar 25 09:54:40 PST 1999
add reference path D:\jdk1.2\jre\lib\rt.jar
add reference path D:\jdk1.2\jre\lib\i18n.jar
add target path .\JCloak.jar
Loading and scanning classes...done scanning classes.
Verifying all interfaces implemented...
Done verifying interfaces implemented, 0 errors.
Verifying all method/field/class references...
Done verifying references, 0 errors.
Done, total errors=0
Note that Verify cannot detect classes referenced by forName().