[Soot-list] Exception in thread "main" java.lang.NoClassDefFoundError: java_cup/runtime/Scanner

Stefan Willenbrock willenbr at rhrk.uni-kl.de
Sat May 29 19:11:34 EDT 2010


Even if this is rather old, i found the cause of this problem and want 
to publish it here for others stumbling over the same issue.

> But when I tried "Creating a class from scratch with Soot" in
> http://www.sable.mcgill.ca/soot/tutorial/createclass/index.html.
>
> javac Main.java is ok, and I got Main.class. Then when I run java Main,
> the following errors happend:
>
> Exception in thread "main" java.lang.NoClassDefFoundError:
> java_cup/runtime/Scanner
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(Unknown Source)
>         at java.security.SecureClassLoader.defineClass(Unknown Source)
[..]

The java_cup/runtime/Scanner class (and the whole java_cup pkg in 
general) is contained within polyglot, and whenever you see this 
exception, it means there is polyglot missing in your classpath.

If you have downloaded the sootall archive you have to add

path\to\extracted\archive\sootall-2.4.0\polyglot-1.3.5\classes

to your vm classpath


More information about the Soot-list mailing list