To start with Groovy in Netbeans IDE, download Netbeans from here . You should check that you have downloaded Netbeans bundle with groovy.
Then you should first check that everything is working in Netbeans by executing a Java program.
Open Netbeans, Click on File ---
|
New File
after clicking new file, it will open a window, the select Groovy from category section and groovy script from File Type and click Next
After clicking next again it will open a new window, put the desired file name and click Finish.
It will create a new file in you currently open project (in main project)
Now write the desired groovy code on this file and run file by right clicking on this file
def name='arvind'
println "Hello $name!"
See the result in output screen.
About groovy:-
Apache Groovy is a powerful, optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform aimed at improving developer productivity thanks to a concise, familiar and easy to learn syntax. It integrates smoothly with any Java program, and immediately delivers to your application powerful features, including scripting capabilities, Domain-Specific Language authoring, runtime and compile-time meta-programming and functional programming. (from Groovy website)Read more about Groovy here.
No comments:
Post a Comment