The Internet Archive discovers and captures web pages through many different web crawls.
At any given time several distinct crawls are running, some for months, and some every day or longer.
View the web archive through the Wayback Machine.
Java's support of reflection enables you to create an interpreter that executes commands interactively. This article demonstrates how to build a reflection-based system that allows simple scripting of Java programs without having to install a special-purpose scripting language. It also provides a downloadable sample program.
by Greg Travis
October 21, 2002
cripting languages exist because some programming tasks are both simple and important, and carrying them out with a language that doesn't tax the mind as much as a system programming language sometimes will is beneficial. (See Sidebar: Scripting vs. Programming for a full explanation of the differences between scripting languages and programming languages.) Although Java is most decidedly a programming language (it is typed, highly structured, and compiled), don't you sometimes wish you could do scripting in Java, or something close to Java?
Thanks to the Reflection API, you can. Using the Reflection API, you can run methods dynamically. Java's support of reflection enables you to create an interpreter that executes commands interactively. This article describes a system you can use to build an interpreter into your application. It demonstrates how to build a reflection-based system that allows simple scripting of Java programs without having to install a special-purpose scripting language. It also provides a downloadable sample program. This solution can allow you to create simple control scripts for your Java programs.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!