Home AMX User Forum Duet/Cafe Duet

Java code optimizer.

I'm attempting to use proguard ( http://sourceforge.net/projects/proguard/ ) purely for the optimization effects on duet code, but it keeps choking on 2 of the AMX standard library files saying they have an invalid magic number like so:
C:\Users\Greg\Desktop\proguard4.6\bin>java -jar ../lib/proguard.jar @amx.pro
ProGuard, version 4.6
Reading program jar [C:\Users\Greg\Desktop\proguard4.6\bin\fnCrypto2_dr1_0_0.j
ar]
Reading library jar [C:\Users\Greg\Desktop\proguard4.6\bin\core.jar]
Reading library jar [C:\Users\Greg\Desktop\proguard4.6\bin\http.jar]
Reading library jar [C:\Users\Greg\Desktop\proguard4.6\bin\j2me.jar]
Reading library jar [C:\Users\Greg\Desktop\proguard4.6\bin\morpheus.jar]
Reading library jar [C:\Users\Greg\Desktop\proguard4.6\bin\oscar.jar]
Reading library jar [C:\Users\Greg\Desktop\proguard4.6\bin\snapirouter.jar]
Error: Can't read [C:\Users\Greg\Desktop\proguard4.6\bin\snapirouter.jar]
     (Can't process class [com/amx/duet/routers/snapi/Activator.class
       (Invalid magic number [6bbaa022] in class))

If i remove the reference to the snapi library it then does the same choke on the devivesdk library, and if i remove both references it starts the next step where it chokes due to unresolved references.

Has anyone tried using this product or anything similar with duet?

<Delete/Edit/Moved this due to accidentally posting in the wrong subsection>

Comments

  • ericmedleyericmedley Posts: 4,177
    Isn't Java Code Optimizer an oxymoron?
  • GregGGregG Posts: 251
    ericmedley wrote: »
    Isn't Java Code Optimizer an oxymoron?

    Yes, to be sure, but it promises to cut out all the unused classes and such - which I don't really have time to figure out.

    I imported basically the whole bouncycastle crypto library for midp devices to get an https ssl connection working, but the thing is now like 3 meg (and takes about 10 seconds to initialize the socket).

    I don't currently know enough about what parts are being used for my one little function to strip it down myself (and as usual there is not enough time to keep researching it for this job). So I was thinking an automated program that would do that for me would be nice.
  • those jars are encrypted using an AMX proprietary encryption so you will be unable to analyze them
  • And regarding the time it takes to create and SSL socket using Bouncy Castle...that is typical for a Java based SSL implementation. It is VERY slow due to the amount of crypto math that must occur in the Java realm.
  • GregGGregG Posts: 251
    Yeah, we've aborted that approach and we're going with a small linux pc as an intermediate interpreter, since response time is a critical factor.
Sign In or Register to comment.