I have run the following code in this page RsyntaxTextArea using Java and i run the program exactly the way that is been mentioned in this site.And i'm getting the output as intended. But i have tried to modify this java code to Groovy code, something like:
import groovy.swing.SwingBuilder
import javax.swing.*
import java.awt.*
swing = new SwingBuilder()
frame = swing.frame(title : "test", defaultCloseOperation:JFrame.EXIT_ON_CLOSE, pack:true, show : true, size :[100,100])
{
panel
{
RSyntaxTextArea textArea = new RSyntaxTextArea();
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
}
}
And when i try to run this script as follows:
groovyc -classpath rsyntaxtextarea.jar TextEditorDemo.groovy
I get the errors stating that:
groovy: 9: unable to resolve class RSyntaxTextArea
@ line 9, column 19.
RSyntaxTextArea textArea = new RSyntaxTextArea();
^
/home/anto/Groovy/Rsyntax/ST.groovy: 9: unable to resolve class RSyntaxTextArea
@ line 9, column 30.
RSyntaxTextArea textArea = new RSyntaxTextArea();
^
/home/anto/Groovy/Rsyntax/ST.groovy: 10: unable to resolve class RSyntaxTextArea
@ line 10, column 7.
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
I guess i have made wrong in running the program. How i do i run the program in this case by defining the classpath too.