Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Groovy - Scripting for Java

Groovy -Scripting for Java Groovy is an open-source scripting language that is implemented in Java and is tightly integrated with it. It requires Java\'s JDK 1.4. Groovy adds some features of the Ruby and Python scripting languages to Java. Features of G

Tutorial Details:

Groovy scripts can use any Java classes. They can be compiled to Java bytecode that can be invoked from normal Java classes. The Groovy compiler, groovyc, compiles both Groovy scripts and Java source files, however some Java syntax
In theory, entire applications could be written in Groovy that would have similar performance characteristics to an equivalent Java application. This distinguishes Groovy from other scripting languages such as Ruby, Python, Perl and BeanShell. One of the things that makes Groovy perform more slowly than Java today is that the generated bytecode uses reflection to call constructors and private/protected methods.
This article doesn\'t cover every feature of Groovy, but it covers a large number of them. It assumes that you are familiar enough with Java syntax to be able to compare Java syntax to Groovy syntax.

If we could all agree on what makes a good programming language syntax then we wouldn\'t need so many of them. Based on the number of programming languages out there, we obviously don\'t agree. After reading this article, you may decide that you like Java syntax just fine and that Groovy syntax is just too much syntactic sugar for your tastes. If that is your conclusion, I encourage you to investigate BeanShell from Pat Niemeyer at http://www.beanshell.org. It sticks much closer to standard Java syntax. On the other hand, if you prefer the shorter syntax of Groovy then that\'s just groovy


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Groovy - Scripting for Java

View Tutorial:
Groovy - Scripting for Java

Related Tutorials:

Java in a Nutshell Code Example
The Java programming examples shown here are from the book Java in a Nutshell , by David Flanagan, published by O\'Reilly & Associates.
 
JavaWorld - Java Tips index
JavaWorld - Java Tips index
 
Web services hits the Java scene, Part 1
Web services hits the Java scene, Part 1
 
The Java Web Services Tutorial
This tutorial is a beginner\'s guide to developing Web services and Web applications using the Java Web Services Developer Pack (Java WSDP).
 
Interface Tool for Java
Interface Tool for Java Interface Tool for Java is a tool that allows Java programs to communicate with ActiveX objects. It allows easy integration of ActiveX objects into a Java Environment
 
Java Floating License Enforcer Developer Package
Java Floating License Enforcer for Java Developer Package
 
Java 2D imaging for the Standard Widget Toolkit
Java 2D imaging for the Standard Widget Toolkit Bring the power of 2D imaging to your Eclipse plug-ins In this article, however, you'll learn how to have the best of both worlds. I'll demonstrate a simple technique that will allow you to paint Java
 
Java POS Software
Java POS Software Large retailers are increasingly turning to Java software to manage their retail enterprise.
 
Java Mime Magic Library
Java Mime Magic Library jMimeMagic is a Java library for determining the MIME type of files or streams.
 
Getting Groovy with XML
XML sucks. Oh, wait, XML rocks. Well, it actually does a lot of both. It rocks because of all of the editors, validators, and tools written for it. XML has all but replaced any notion of a new custom text-based data language. But it also sucks because it\
 
Build scripts with Groovy and Ant
Build scripts with Groovy and Ant Summary In nearly all developers' toolboxes, Ant is the standard build tool for Java applications, thanks to its open, standard, and multiplatform structure. Though it represents a great improvement in automating produc
 
Using the ASM Toolkit for Bytecode Manipulation
Using the ASM Toolkit for Bytecode Manipulation Sometimes Java developers need to generate or change Java bytecode in the runtime. Is can be necessary for AOP or debugging, or even for performance optimization. There are several frameworks available that
 
Core Java Data Objects Excerpt
This book excerpt is from Core Java Data Objects,
 
Development Tool for Java-COM Bridge
What is Development Tool for Java-COM Bridge? Development Tool for Java-COM Bridge is a tool for developing and enabling tight communication between JavaTM- and COM-based applications. An application running on Microsoft Windows® systems is typically co
 
Object-Oriented Language: Java / APIs (Classes & Libraries)
The Java Platform APIs are a set of essential interfaces that developers need to build their Java applications and applets. All Java Platfrom APIs are open and extensible, and are created by JavaSoft and industry-wide specialists in each target technology
 
Tiger and Beyond, the Future of the Java Platform
Part Two of an interview with Sun Microsystems' Sun Fellow, Graham Hamilton, explores Java 2 Platform, Standard Edition 5.0 (J2SE 5.0) and the future of the Java language.
 
Welcome to Java Developers paradise!
Welcome to Java Developers paradise! T his site contains many quality Java, JSP, RMI, MySQL downloads, tutorials, source codes and links to other java resources. We have large number of links to the tutorials on java which will help you learn java
 
Collection of Large Number of Java Interview Questions!
Collection of Large Number of Java Interview Questions! Collection of Large Number of Java Interview Questions The Core Java Interview Questions The Jakarta Struts Interview Questions
 
Collection of Large Number of Java Sample Programs and Tutorials
Collection of Large Number of Java Sample Programs and Tutorials Collection of Large Number of Java Sample Programs and Tutorials HelloWorld Java Program Simple Java Program for beginners that prints HelloWorld! on console.
 
JPackIt JPackIt is a Java application for packaging a Java project into single executable package
Java Project in single jar, class or exe containing all java application resources and referenced libraries.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.