Current area: HOME -> Java -> Java Virtual Machine Articles
Java Virtual Machine
Add MP3 capabilities to Java Sound with SPI
The Service Provider Interface (SPI), allows developers to transparently add new functions to the JVM. That allows older Java programs to take advantage of the newly added functions with no changes and no recompiling. In this article, the Author introduces the SPI by way of a real-world example: MP3 sound files
Bytecode basics
All Java programs are compiled into class files that contain
bytecodes, the machine language of the Java virtual machine.
Here's a first look at Java's bytecodes.
Control flow
All Java programs are compiled into class files that contain
bytecodes, the machine language of the Java virtual machine.
This article takes a look at how control flow is handled by the
Java virtual machine, including the relevant bytecodes.
Designing with Runtime Class Information
This article gives advice on using runtime class information in
Java programs. It talks about the method area of the JVM and
the structure of Java objects, upcasting and downcasting,
polymorphism and dynamic binding, java.lang.Class and
reflection, and -- perhaps most importantly -- reveals how best
to ask a hippopotamus to dance.
Eye on performance: Tuning garbage collection
If you're part of the current blogging craze, then you've likely heard of Blog-City, a blogging site owned and operated by Blog-City Ltd., a small company in Scotland. When some unexpected performance issues cropped up, Java performance experts Jack Shirazi and Kirk Pepperdine were asked to assist in a technical tuning of Blog-City. Their detective work was complicated by hardware constraints and communication channels (IRC, ftp, and the occasional e-mail) used throughout the project.
Fixing the Java Memory Model, Part 2
JSR 133, which has been active for nearly three years, has
recently issued its public recommendation on what to do about
the Java Memory Model (JMM). In part 1 of this series, the
author focused on some of the serious flaws that were found in
the original JMM, which resulted in some surprisingly difficult
semantics for concepts that were supposed to be simple. This
month, he reveals how the semantics of volatile and final will
change under the new JMM, changes that will bring their
semantics in line with most developers' intuition. Some of
these changes are already present in JDK 1.4; others will have
to wait until JDK 1.5.
Fixing the Java Memory Model, Part 2
JSR 133, which has been active for nearly three years, has
recently issued its public recommendation on what to do about
the Java Memory Model (JMM). This article details how the
semantics of volatile and final will change under the new JMM,
changes that will bring their semantics in line with most
developers' intuition. Some of these changes are already
present in JDK 1.4 -- others will have to wait until JDK 1.5.
Floating-point arithmetic
All Java programs are compiled into class files which contain bytecodes, the machine language of the Java virtual machine. This article takes a look at the bytecodes that implement the floating-point capabilities of Java.
How the Java virtual machine handles method invocation and return
This article takes a look at how method invocation and return
is handled by the Java virtual machine, with a close inspection
of the relevant bytecodes is included. The article ends with a
source-code example of method invocation.
How the Java virtual machine performs thread synchronization
All Java programs are compiled into class files, which contain
bytecodes, the machine language of the Java virtual machine.
This article takes a look at how thread synchronization is
handled by the Java virtual machine, including the relevant
bytecodes.
Java Bytecode Engineering with BCEL
The Apache Byte Code Engineering Library (BCEL) lets you dig
into the bytecode of Java classes and transform existing class
representations or construct new ones, giving you the most
power over your code. That power comes with complexity, though.
In this article, you'll receive BCEL basics and be guided
through a sample BCEL application so you can decide if the
power justifies the complexity.
Java security: How to install the security manager and customize your security policy
One of the primary reasons Java technology is a "good fit" for
networks is that it has a comprehensive security model designed
into its architecture. This article turns to one aspect of that
security model: the security manager of the Java virtual
machine (JVM). The security manager, working in concert with
the Java API, enables programmers to establish a custom
security policy for their Java applications.
Java's garbage-collected heap
A key feature of Java is its garbage-collected heap, which
takes care of freeing dynamically allocated memory that is no
longer referenced. Because the heap is garbage-collected, Java
programmers don't have to explicitly free allocated memory.
Here's a hands-on introduction to Java's garbage-collected
heap.
Java's security architecture
One of the primary reasons Java technology is a "good fit" for
networks is that it has a comprehensive security model designed
into its architecture. The first half of this article gives an
overview of Java's security model. The second half focuses on
one aspect of that security model: the safety features built
into the Java virtual machine.
Logic and integer arithmetic
All Java programs are compiled into class files that contain bytecodes, the machine language of the Java virtual machine. This article takes a look at the bytecodes that implement the logical and integer arithmetic capabilities of Java.
Mash that trash -- Incremental compaction in the IBM JDK Garbage Collector
This article discusses incremental compaction, a new feature in the memory management component of IBM JDK 1.4.0. Incremental compaction is a way of spreading compaction work across different garbage collection cycles, thereby reducing pause times. The authors discuss the need for incremental compaction, the compaction phases at a high level, and some runtime parameters. They also explain how to interpret changes in the verbosegc output.
Monitoring and Management of a JVM
Many of the developers do not really appreciate and know the details of the JVM - the working environment of their application. This article sheds some light on the JVMPI interface that can be utilized by developers to fine tune their applications.
Multiprocess JVMs
Combining multiple Java processes into a single Java virtual machine (JVM) is one way to reduce the JVM memory overhead. This article discusses the techniques required to achieve a multiprocess JVM.
Objects and arrays
All Java programs are compiled into class files that contain
bytecodes, the machine language of the Java virtual machine.
This article takes a look at the bytecodes that manipulate
objects and arrays.
Security and the class loader architecture
One of the primary reasons Java technology is a "good fit" for
networks is that it has a comprehensive security model designed
into its architecture. Beginning with a refresher on the Java
sandbox, this article turns to one aspect of that security
model: the class loader architecture of the Java virtual
machine. The class loader architecture causes code downloaded
from different sources to be kept separate, and prevents the
loading of untrusted classes that declare themselves to be part
of a trusted library.
Security and the class verifier
One of the primary reasons Java technology is a "good fit" for
networks is that it has a comprehensive security model designed
into its architecture. This article turns to one aspect of that
security model: the class verifier of the Java virtual machine
(JVM). The class verifier enables untrusted code to be verified
up front, rather than on the fly as the code is executed. This
ability provides uninterrupted execution (the program can't
"crash" uncontrollably) at a minimal cost in speed degradation.
Tacit Records: The Java Class Loader
We begin a new column on software security and quality with a discussion of an essential element of Java's type-safety strategy.
The Hotspot Virtual Machine
This article describes the "popular lore" that aims to improve
the performance of Java programs in ways that reduce the
flexibility of the code, and describes Sun's Hotspot JVM in
technical detail. The article shows how Hotspot attempts to
eliminate the performance bottlenecks that gave rise to the
"popular lore" in the first place.
The J2METM Platform: Which APIs Come from the J2SETM Platform?
This article describes the J2SE Java virtual machine features supported by the KVM, what classes have been inherited from the J2SE by the CLDC, and specifically, what new classes have been added to the CLDC.
The Java class file lifestyle
A key component of Java is the Java class file -- a precisely
defined file format to which Java programs are compiled. The
class file can be loaded by any Java Virtual Machine
implementation and is the vehicle for the transmission of
compiled Java across networks. Here's a hands-on introduction
to the Java class file.
The Java HotSpot Virtual Machine
One major reason for the interest in the Java platform is that unlike programs written in traditional languages, Java technology-based programs are distributed in a portable, secure form. In the past, use of a portable distribution format generally incurred a performance penalty during execution. By applying modern dynamic compilation technology, it is possible to alleviate this performance penalty while still maintaining portability across platforms. The Java HotSpot virtual machine (VM) is a key component in maximizing deployment of enterprise applications. It is a core component of Java 2 Platform, Standard Edition (J2SE) software, supported by leading application vendors and technologies.
The lean, mean, virtual machine
A key component of Java is the Java Virtual Machine -- a
virtual computer, typically implemented in software on top of a
"real" hardware platform and operating system, that runs
compiled Java programs. Thanks to the JVM, programs written in
Java don't have to be rewritten to run on different computers.
Here's a hands-on introduction to the JVM.
Understanding the keys to Java security -- the sandbox and authentication
Security concerns are important for Java (and other systems for executable content, like ActiveX). When new flaws like the recently announced code-signing hole are discovered, the press often covers the story without much depth. We think it is important to explain Java security holes and antidotes in their proper context. This article explains the code-signing bug in technical detail. But instead of jumping into the explanation right off the bat, we begin with a bit of stage-setting. We'll start by covering the Java sandbox, and go on to discuss authentication through digital signing. Only then do we introduce the star of the show, the code- signing security hole, and discuss its impact and implications.
Use JNDI to share objects between different virtual machines
Imagine the following: Process A on machine B puts an object into a Hashtable. Now, a separate process C on a different machine D can access that object from its own local copy of the Hashtable -- even after process A terminates and the virtual machine unloads! Now imagine all this is achieved without the use of RMI, and without involving an ORB, CORBA, EJB, or a database. What's the secret? The Java Naming and Directory Interface (JNDI). This month's tool is the JNDIHashtable -- which, as its name reveals, uses JNDI to do its thing.
Computerworld The most comprehensive source of news and analysis on the technologies and management issues of information technology. ...
subscribe now