I may be stupid but.....

  • Forster

    Forster - 2005-09-28

    I am having problems sorting out the obfuscator with jode, I have the System env variable CLASSPATH set correctly and I have also included in my .jos file all the contents again.

    But I am getting a noclassdeffound error for AWTEvent$1  (my programs are server programs with no gui so its not from my stuff as far as I am aware)

    The exact error is

    Jode (c) 1998-2001 Jochen Hoenicke <jochen@gnu.org>
    used before: 229272
    Loading and preserving classes
    Exception in thread "main" java.lang.NoClassDefFoundError: java.awt.AWTEvent$1
            at jode.bytecode.ClassInfo.loadInfo(ClassInfo.java:620)
            at jode.obfuscator.ClassIdentifier.initClass(ClassIdentifier.java:371)
            at jode.obfuscator.PackageIdentifier.loadMatchingClasses(PackageIdentifi
            at jode.obfuscator.PackageIdentifier.loadMatchingClasses(PackageIdentifi
            at jode.obfuscator.PackageIdentifier.loadMatchingClasses(PackageIdentifi
            at jode.obfuscator.ClassBundle.run(ClassBundle.java:493)
            at jode.obfuscator.Main.main(Main.java:189)

    the jos file is as follows

    classpath="C:\\Program Files\\Java\\jdk1.5.0_04\\jre\\lib\\rt.jar","C:\\Program Files\\Java\\jdk1.5.0_04\\lib\\dt.jar","C:\\Program Files\\Java\\jdk1.5.0_04\\lib\\tools.jar","C:\\Program Files\\Java\\jdk1.5.0_04\\lib\\ext\\dnsns.jar","C:\\Program Files\\Java\\jdk1.5.0_04\\lib\\ext\\localedata.jar","C:\\Program Files\\Java\\jdk1.5.0_04\\lib\\sunjce_provider.jar","C:\\Program Files\\Java\\jdk1.5.0_04\\lib\\sunpkcs11.jar","C:\\lib\\xmlParserAPIs.jar","c:\\lib\\activation.jar","c:\\lib\\servlet.jar","c:\\lib\\mail.jar","c:\\lib\\saaj-api.jar","c:\\lib\\saaj-impl.jar","c:\\lib\\xercesImpl.jar"
    dest = "C:\\obdist"
    revtable = "translat.tbl"
    strip = "unreach","lnt","lvt"
    load = new WildCard { value = "*" }
    preserve = new WildCard { value = "com*.main.*" },
               new WildCard { value = "com*.<init>()V" }
    renamer = new StrongRenamer
    analyzer = new ConstantAnalyzer
    post = new LocalOptimizer, new RemovePopAnalyzer

    Can anyone tell me what I am missing.


    • Jochen Hoenicke

      Jochen Hoenicke - 2005-09-29

      You should never load "*", as this would obfuscate also the java packages, which cannot work.

      Just load your own packages.  If you have classes that are not packaged, you should list them all one by one.


Log in to post a comment.