Search code examples
javajflex

java.lang.NoSuchMethodError: java_cup.runtime.lr_parser.getSymbolFactory()Ljava_cup/runtime/SymbolFactory


A project I just started working on uses JFlex, and when I try and compile the project using ant, I get the following error:

java.lang.NoSuchMethodError: java_cup.runtime.lr_parser.getSymbolFactory()Ljava_cup/runtime/SymbolFactory

What's causing this? I have the JFlex jar downloaded, and am using it in my project.


Solution

  • Turns out to use the jflex ant tasks, you need to download JFlex from here, unzip it somewhere, then copy the jflex-1.6.1/lib/* files to your ant/lib/ folder, and try again.