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

Re: a problem using SableCC-2.10

Israel Antezana Rojas wrote:
>...I get the following error message:
>           Exception in thread "main" java.lang.NoClassDefFoundError:
> ca/macgill/sable/util/Switch
>           at Main.main(Main.java:50)

Hi Israel.

There are many possibilities...

(1) You didn't recompile everything.  (Javac's concept of dependency is
not correct sometime.)  So, make sure you delete all ".class" files,
even for your own code.  Then recompile.

(2) You still have references to "import ca.mcgill.sable.util.*" in your
own classes (most likely in classes that extend DepthFirstAdapter). 
Solution: replace with "import java.util.*".

Also, make sure to remove sableutil.jar from your CLASSPATH.  You
shouldn't have it on your CLASSPATH anymore, not at compile time and not
at run time.

If this doesn't help,  I would be interested in looking at your
Main.java source code.

Etienne M. Gagnon, M.Sc.                     e-mail: egagnon@j-meg.com
Author of SableCC:                 http://www.sable.mcgill.ca/sablecc/