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

Re: JavaCard support in Soot



Hi Ran,

I believe your patch file had been incoporated in the release 1.2.4
except we did not add the explicit command line option "--j2mp". Certainly
you can turn on the swith by assigning Main.isJ2ME the "true" value.

Please check the 1.2.4, let us know if it does not work on J2ME
with above config. Thanks you for your configuration again.

Cheers,
Feng
---------------------------------------------------------------------
Feng Qian                                       fqian@sable.mcgill.ca
Sable Research Group                       http://www.sable.mcgill.ca
School of Computer Science, McGill University        Montreal, Canada

On Wed, 27 Nov 2002, Ran Shaham wrote:

> 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)
>