[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JavaCard support in Soot



Hi,

I sent the below note sometime ago. Would appreciate it if you could have a
look at the suggested changes to Soot in order to support better j2me code,
and consider integrating them into Soot's next release.

Thanks,
Ran.

Here's the old note:

Hi,

When jimplifying a JavaCard applet in J2ME mode soot gives the following
message:

java.lang.RuntimeException: tried to get nonexistent method:
<java.lang.Class:
java.lang.Object newInstance()> !
        at soot.Scene.getMethod(Scene.java:334)
        at soot.jimple.toolkits.invoke.MethodCallGraph.isReachable
(MethodCallGraph.java:220)
        at soot.jimple.toolkits.invoke.MethodCallGraph.initialize
(MethodCallGraph.java:178)
        ..........

This is since the class java.lang.Class is excluded from the java.lang
package
in JavaCard's specification.

Attached a fix to MethodCallGraph.java to avoid above exception.

Also, it seems that J2ME is not "officially" supported in the sense that
there
is no command line argument to specify a J2ME mode.
This is convenient (at least for us) in an environment where J2SE and
J2ME/JavaCard applications are analyzed.
Attached support for the command line argument --j2me in Main.java.


Cheers,
Ran.

(See attached file: better-j2me-support.zip)

Attachment: better-j2me-support.zip
Description: Zip archive