Lexer Module Tips and FAQ
Version: 1.0
Author: Miloslav Metelka, Sun Microsystems/NetBeans
Document History:
available in CVS
Problem: I get the following stacktrace whenever trying to run the demo.
java.lang.NoClassDefFoundError: java/lang/CharSequence
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at org.netbeans.modules.lexer.demo.PaneDemo.(Unknown Source)
at org.netbeans.modules.lexer.demo.javacc.CalcPaneDemo.(Unknown Source)
at org.netbeans.modules.lexer.demo.javacc.CalcPaneDemo.main(Unknown Source)
Answer: This or similar stacktrace occurs when demo is attempted to be run on JDK1.3 or earlier.
Please check the Compatibility page for further details.
Problem: How can I use the lexer module for syntax coloring in the editor?
Answer: The Editor Bridge makes that possible.
Problem: Can I reuse an existing javacc or antlr grammar file for the lexer module
without any further modifications?
Answer: Please see Batch Lexer Requirements page.