Monday, 19 September 2016

Getting started with Groovy in NetBeans 8.0.1


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 powerfuloptionally 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

Change image source dynamically on hyperlink

 Changing image source dynamically using JQuery. Here in this example I have created there hyperlink and stored all images in the same folde...