[Soot-list] Mac OS Mojave

Ching Ping Lee cplee at computer.org
Sat Jan 19 05:18:16 EST 2019


Thanks!
I found the error. The java and javac command was using the built in in
/usr/bin which is apple's.  Recompiling it using 1.8 specifically and
ensuring the path are all map to 1.8 jdk resolved it!

On Sat, 19 Jan 2019, 17:14 Ishaq <ishaq at ishaq.pk wrote:

> I believe you should be using jdk 1.8 at the latest (i could be wrong),
> also try passing the path to rt.jar e.g. something like this
>
> java -cp /Users/chingping.lee/Development/soot/sootclasses-
> trunk-jar-with-dependencies.jar soot.Main -cp .:/Library/Java/
> JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/rt.jar HelloWorldApp
>
> --
> MI
>
>
> On Sat, Jan 19, 2019 at 6:42 AM Ching Ping LEE <cplee at computer.org> wrote:
>
>> Found the rt.jar in
>> /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib
>>
>> My HelloWordApp as follows:
>> class HelloWorldApp {
>>     public static void main(String[] args) {
>>         System.out.println("Hello World!"); // Display the string.
>>     }
>> }
>>
>> So I did the following:
>>
>> java -cp
>> /Users/chingping.lee/Development/soot/sootclasses-trunk-jar-with-dependencies.jar
>> soot.Main -cp
>> .:/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib
>> HelloWorldApp
>>
>> Then this is what I get:
>> Soot started on Sat Jan 19 14:41:20 SGT 2019
>> java.lang.IllegalArgumentException
>> at org.objectweb.asm.ClassReader.<init>(ClassReader.java:185)
>> at org.objectweb.asm.ClassReader.<init>(ClassReader.java:168)
>> at org.objectweb.asm.ClassReader.<init>(ClassReader.java:439)
>> at soot.asm.AsmClassSource.resolve(AsmClassSource.java:65)
>> at soot.SootResolver.bringToHierarchyUnchecked(SootResolver.java:240)
>> at soot.SootResolver.bringToHierarchy(SootResolver.java:214)
>> at soot.SootResolver.bringToSignatures(SootResolver.java:279)
>> at soot.SootResolver.processResolveWorklist(SootResolver.java:172)
>> at soot.SootResolver.resolveClass(SootResolver.java:134)
>> at soot.Scene.loadClass(Scene.java:942)
>> at soot.Scene.loadClassAndSupport(Scene.java:927)
>> at soot.Scene.loadNecessaryClass(Scene.java:1729)
>> at soot.Scene.loadNecessaryClasses(Scene.java:1741)
>> at soot.Main.run(Main.java:241)
>> at soot.Main.main(Main.java:141)
>>
>> I did the same on a centOS VM build and it does not issue any error
>>
>> regards
>> CP
>>
>>
>> On 19 Jan 2019, at 1:17 AM, Ishaq <ishaq at ishaq.pk> wrote:
>>
>> I am running Mac OS Mojave and it seems to work for me.
>>
>> My path to rt.jar is
>> /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home/jre/lib/
>>
>> Have you tried to compile your input program first, Sometimes Soot can
>> raise weird issue if you try to pass it .java which goes away when you pass
>> it .class
>>
>> --
>> MI
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20190119/58f23b50/attachment-0001.html>


More information about the Soot-list mailing list