Tools and Tool Architecture
Java Virtual Machine Tool Interface (JVMTI)
JVMTI is a
new native programming interface for use by development and
monitoring tools. It provides both a way to inspect the state
and to control the execution of applications running in the Java
virtual machine (VM). JVMTI is intended to provide a VM interface
for the full breadth of tools that need access to VM state,
including but not limited to: profiling, debugging, monitoring,
thread analysis, and coverage analysis tools.
JVMTI will replace the now deprecated JVMPI and JVMDI in the next
major release of J2SE.
Refer to the documentation at
http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/index.html.
Java Platform Debugger Architecture (JPDA)
JPDA itself has many new features, described in more detail on the
JPDA enhancements page.
-
A read-only subset of JDI has been defined. This subset
can be used on a debuggee in which no debug code can be executed
(such as a core file or a process that is hung or was not
started in debug mode).
The subset allows creation of JDI connectors for use in debugging
such debuggees.
-
A service provider interface for connectors and transports
allows debugger vendors, or even end users, to create
their own JDI connectors and transports and plug them into
the JPDA reference implementation. For example, a connector
could be provided to use SSL to communicate between the
debugger and debuggee.
-
JDI supports the new language features (generics, enums, and varargs).
-
The lowest layer of JPDA, the Java Virtual Machine Debugger Interface (JVMDI),
has been deprecated and will be removed in the next major J2SE release.
Replacing it is the Java Virtual Machine Tool Interface
(JVMTI). This is a more general interface that allows profiling to be done
as well as debugging. The current profiling interface, Java Virtual Machine
Profiling Interface(JVMPI) is also deprecated and will be removed
in the next major release.
-
The JPDA reference implementation includes new JDI connectors
that allow corefiles and hung processes to be debugged.
Refer to the documentation at
http://java.sun.com/j2se/1.5.0/docs/guide/jpda/index.html.
Java Compiler (javac)
Compiler options include:
-
-source 1.5 - Enable 1.5 specific language features to be
used in source files. (-target 1.5 is implied.)
-
-target 1.5 - Allow javac to use 1.5 specific features in
the libraries and virtual machine.
-
-Xlint - Enable javac to produce warning messages about
legal, but suspect and often problematic, program constructs.
An example would be declaring a class that implements
Serializable but does not define a serialVersionUID.
-
-d32 - Indicate a 32-bit Solaris or Linux platform.
-
-d64 - Indicate a 64-bit Solaris or Linux platform.
Refer to the man page documentation at
http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html.
Javadoc Tool
See
What's New in Javadoc 1.5.0 at http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/whatsnew-1.5.0.html.
Annotation Processing Tool (apt)
apt is a new command-line utility for annotation processing.
It includes a set of reflective APIs and supporting infrastructure to
process program
annotations.
Refer to the documentation at
http://java.sun.com/j2se/1.5.0/docs/guide/apt/index.html.