[Soot-list] Error: class sablecc.SableCC read in from a classfile in which SableCC was expected

Prof. Laurie HENDREN hendren at cs.mcgill.ca
Tue Jan 31 08:33:06 EST 2006


Hi Sebastien,

If sablecc.SableCC is inside package sablecc,  then I think you want
to have c:\ on your CLASSPATH and then say,

> C:\>java soot.Main sablecc.SableCC

so that the name of the file that you are processing matches its
location in a package directory structure.

Other soot-ites, is that correct?

Cheers, Laurie



+-----------------------------------------------------------------
| Laurie Hendren --- laurie.hendren at mcgill.ca
| Associate Dean (Academic), Faculty of Science,
| Dawson Hall, McGill University, 853 Sherbrooke St W,
| Montreal QC H3A 2T6 Canada, 514-398-7179, fax 514-398-1774
+----------------------------------------------------------------
| For contact and home page info as Professor, Computer Science:
| http://www.sable.mcgill.ca/~hendren   ---  hendren at cs.mcgill.ca
| Research: http://www.sable.mcgill.ca  http://aspectbench.org
+----------------------------------------------------------------

On Mon, 30 Jan 2006, Sébastien Adam wrote:

> Hi,
>
>
>
> Does somebody know what is the problem?
>
>
>
> I work with Windows XP and soot-2.2.0.  I have a problem with my classpath.
> I set my PATH and CLASSPATH as follow to get around this problem :
>
>
>
> C:\Program Files\Java\jdk1.5.0_06\bin;
>
> C:\aspectj1.5\bin;
>
> C:\aspectj1.5\lib\aspectjrt.jar;
>
> C:\sabs\local\system;
>
> C:\Python24;
>
> C:\abc-1.1.0;C:\abc-1.1.0\bin;
>
> C:\abc-1.1.0\lib\abc-complete.jar;
>
> C:\abc-1.1.0\lib\abc-runtime.jar;
>
> C:\WINDOWS\system32;
>
> C:\WINDOWS;
>
> C:\WINDOWS\System32\Wbem;
>
> C:\Program Files\ATI Technologies\ATI Control Panel;
>
> C:\Program Files\Fichiers communs\STOPzilla!;
>
> C:\Program Files\Java\jdk1.5.0_06\bin;
>
> C:\soot-2.2.2\classes;
>
> C:\jasmin-2.2.2\classes;
>
> C:\polyglot-1.3.2\classes;
>
> C:\polyglot-1.3.2\cup-classes;
>
> C:\Program Files\Java\jdk1.5.0_06\jre\lib\rt.jar;
>
> C:\sablecc
>
>
>
> But I get another problem :
>
>
>
> C:\>java soot.Main SableCC
>
> Soot started on Mon Jan 30 14:32:04 EST 2006
>
> Exception in thread "main" java.lang.RuntimeException: Error: class
> sablecc.SableCC read in from a classfile in which SableCC was expected.
>
>         at soot.coffi.Util.resolveFromClassFile(Util.java:93)
>
>         at soot.CoffiClassSource.resolve(CoffiClassSource.java:37)
>
>         at soot.SootResolver.bringToHierarchy(SootResolver.java:148)
>
>         at soot.SootResolver.bringToSignatures(SootResolver.java:172)
>
>         at soot.SootResolver.processResolveWorklist(SootResolver.java:104)
>
>         at soot.SootResolver.resolveClass(SootResolver.java:89)
>
>         at soot.Scene.loadClass(Scene.java:329)
>
>         at soot.Scene.loadClassAndSupport(Scene.java:314)
>
>         at soot.Scene.loadNecessaryClass(Scene.java:861)
>
>         at soot.Scene.loadNecessaryClasses(Scene.java:880)
>
>         at soot.Main.run(Main.java:177)
>
>         at soot.Main.main(Main.java:153)
>
>
>
> SableCC.class is in the folder C:\sablecc. This folder is in my PATH and
> CLASSPATH variables as you can see above.
>
>
>
> If I remove C:\sablecc from my PATH and CLASSPATH variables I get the
> following problem :
>
>
>
> C:\sablecc>java soot.Main SableCC
>
> Soot started on Mon Jan 30 14:42:27 EST 2006
>
> Exception in thread "main" java.lang.RuntimeException: couldn't find class:
> SableCC (is your soot-class-path set properly?)
>
>         at soot.SootResolver.bringToHierarchy(SootResolver.java:139)
>
>         at soot.SootResolver.bringToSignatures(SootResolver.java:172)
>
>         at soot.SootResolver.processResolveWorklist(SootResolver.java:104)
>
>         at soot.SootResolver.resolveClass(SootResolver.java:89)
>
>         at soot.Scene.loadClass(Scene.java:329)
>
>         at soot.Scene.loadClassAndSupport(Scene.java:314)
>
>         at soot.Scene.loadNecessaryClass(Scene.java:861)
>
>         at soot.Scene.loadNecessaryClasses(Scene.java:880)
>
>         at soot.Main.run(Main.java:177)
>
>         at soot.Main.main(Main.java:153)
>
>
>
> OR
>
>
>
> C:\sablecc>java soot.Main -cp "." SableCC
>
> Soot started on Mon Jan 30 14:43:21 EST 2006
>
> Exception in thread "main" java.lang.RuntimeException: Error: class
> sablecc.Sabl
>
> eCC read in from a classfile in which SableCC was expected.
>
>         at soot.coffi.Util.resolveFromClassFile(Util.java:93)
>
>         at soot.CoffiClassSource.resolve(CoffiClassSource.java:37)
>
>         at soot.SootResolver.bringToHierarchy(SootResolver.java:148)
>
>         at soot.SootResolver.bringToSignatures(SootResolver.java:172)
>
>         at soot.SootResolver.processResolveWorklist(SootResolver.java:104)
>
>         at soot.SootResolver.resolveClass(SootResolver.java:89)
>
>         at soot.Scene.loadClass(Scene.java:329)
>
>         at soot.Scene.loadClassAndSupport(Scene.java:314)
>
>         at soot.Scene.loadNecessaryClass(Scene.java:861)
>
>         at soot.Scene.loadNecessaryClasses(Scene.java:880)
>
>         at soot.Main.run(Main.java:177)
>
>         at soot.Main.main(Main.java:153)
>
>
>
> Can anybody help me?
>
>
>
> Regard,
>
> Seb
>
>
>
>



More information about the Soot-list mailing list