I start both in java and in ANTLR. I am trying to use ANTLR in the Netbeans IDE. I tried to run a sample example and followed all the important steps necessary to set an environment variable, including a jar file and modifications to built.xml.
But when I try to clean and create my application, I get the following errors:
Error: Could not find or load main class org.antlr.Tool Java Result: 1 Created dir: ../NetBeansProjects/AntlrTestApp/build/empty Created dir: ../NetBeansProjects/AntlrTestApp/build/generated-sources/ap-source-output Compiling 1 source file to ../NetBeansProjects/AntlrTestApp/build/classes ../NetBeansProjects/AntlrTestApp/src/antlrtestapp/AntlrTestApp.java:24: error: cannot find symbol grammarLexer lexer = new grammarLexer(input); symbol: class grammarLexer location: class AntlrTestApp ../NetBeansProjects/AntlrTestApp/src/antlrtestapp/AntlrTestApp.java:24: error: cannot find symbol grammarLexer lexer = new grammarLexer(input); symbol: class grammarLexer location: class AntlrTestApp ../NetBeansProjects/AntlrTestApp/src/antlrtestapp/AntlrTestApp.java:26: error: cannot find symbol grammarParser parser = new grammarParser(tokens); symbol: class grammarParser location: class AntlrTestApp ../NetBeansProjects/AntlrTestApp/src/antlrtestapp/AntlrTestApp.java:26: error: cannot find symbol grammarParser parser = new grammarParser(tokens); symbol: class grammarParser location: class AntlrTestApp ../NetBeansProjects/AntlrTestApp/src/antlrtestapp/AntlrTestApp.java:29: error: cannot find symbol Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); symbol: class Main location: class AntlrTestApp ../NetBeansProjects/AntlrTestApp/src/antlrtestapp/AntlrTestApp.java:31: error: cannot find symbol Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); symbol: class Main location: class AntlrTestApp 6 errors ../NetBeansProjects/AntlrTestApp/nbproject/build-impl.xml:603: The following error occurred while executing this line: ../NetBeansProjects/AntlrTestApp/nbproject/build-impl.xml:244: Compile failed; see the compiler error output for details. BUILD FAILED (total time: 1 second)
I tried this from the last 2-3 days and looked for all possible solutions, but nothing worked for me.
source share