Create dynamic applications with javax.tools
Understanding and applying javax.tools.JavaCompiler for building dynamic applications
From the developerWorks archives
Date archived: March 20, 2019 | First published: December 11, 2007
Many of today's applications require dynamic capabilities, such as
enabling users to supply an abstract form of computation that extends an application's
static capabilities. The
javax.tools package, added to
Java™ Platform, Standard Edition 6 (Java SE) as a standard API for compiling
Java source, is a superb way to achieve this goal. This article provides an overview of
the major classes in the package, demonstrates how to use them to create a facade
for compiling Java source from Java
Strings instead of files,
and then uses this facade to build an interactive plotting application.
This content is no longer being updated or maintained. The full article is provided "as is" in a PDF file. Given the rapid evolution of technology, some content, steps, or illustrations may have changed.