Advertisment

Tips for Scripting Java with Jython

author-image
CIOL Bureau
Updated On
New Update

BANGALORE, INDIA: Maybe you're writing a Java program, and you need to do a quick one-off script to clean up your database. Sure, you could write it in Java, but that can involve a lot of overhead for a quick script. You could write it in an outside scripting language, but you'd really like access to the business logic already in your Java program.

Advertisment

Or maybe you’re writing a servlet, and the requirements are changing quickly. Your data model is changing, and you're having trouble keeping all the type information consistent.

Or maybe you’re writing a standalone program, and you'd like to use the large variety of tools already written for Java, but you'd also like to use a tool that makes your program 25-50 percent shorter, and easier to write and maintain.

Jython is the tool for you.

Jython is a complete re-implementation of the Python programming language, written in 100 percent pure Java, which runs on any Java Virtual Machine (JVM). Python is a high-level, interpreted, object-oriented scripting language which combines elegant syntax rules with powerful built-in objects to create a language that is very easy to write, read, and maintain. Python is perhaps most notorious for its use of indentation to mark the beginning and end of statement blocks.

Click here for more...!

tech-news