noidsirius / SootTutorial

A step-by-step tutorial for Soot (a Java static analysis framework)
GNU General Public License v3.0
430 stars 177 forks source link

java.lang.RuntimeException: None of the basic classes could be loaded! Check your Soot class path! #22

Open DeepakUniAdel opened 2 years ago

DeepakUniAdel commented 2 years ago

I am getting this error on running ./gradlew check. Where should I set the Soot class path? What would be going wrong here?

VidyaKamath commented 2 years ago

Check this link: https://github.com/soot-oss/soot/wiki/Introduction:-Soot-as-a-command-line-tool#soots-classpath

DeepakUniAdel commented 2 years ago

Check this link: https://github.com/soot-oss/soot/wiki/Introduction:-Soot-as-a-command-line-tool#soots-classpath

I looked in to it but they have mentioned how to set class path while installing Soot, but what about this repository Soot Tutorial? here the tests are run automatically right? for example if we want to check the test cases of android files used, they have already encoded the test cases. So how to load class path when its already preset? should we change the gradle file or something?

nagkumar commented 2 years ago

image

take the rt.jar and unzip it xxx\SootTutorial\demo\IntraAnalysis directory as above then run the command

gradlew run --args="UsageFinder 'void println(java.lang.String)' 'java.io.PrintStream'"

would show results as

image

for the reason

image

it is only looking in xxx\SootTutorial\demo\IntraAnalysis

Maybe some bug.. or needs further analysis..with the help of the original authors.. pl. see this as a shortcut based on my code breakpoint debugging and limited analysis

DeepakUniAdel commented 2 years ago

Thank you so much sir... It worked

Screenshot 2022-07-24 at 8 44 28 PM