JVMs « JVM « Java Articles

Java Articles
1. Build Deploy
2. Class
3. Core Library
4. Data Types
5. Database JDBC
6. Design
7. Development
8. File Input Output
9. Graphics Desktop
10. J2EE Enterprise
11. J2ME Wireless
12. JVM
13. Language
14. Library Product
15. Network
16. Security
17. SOA Web Services
18. Test
19. Web Development
20. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Products
Java by API
Photoshop Tutorial
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Articles » JVM » JVMs 
1. How the Java virtual machine handles exceptions
"The difference between a DivideByZero and an ArithmeticException exception is that the DivideByZeroException is a checked exception and the ArithmeticException is unchecked. Because the ArithmeticException is unchecked, a method need not declare this exception in a throws clause even though it might throw it. Any exceptions that are subclasses of either Error or RuntimeException are unchecked. (ArithmeticException is a subclass of RuntimeException.) By catching ArithmeticException and then throwing DivideByZeroException, the remainder method forces its clients to deal with the possibility of a divide-by-zero exception, either by catching it or declaring DivideByZeroException in their own throws clauses. This is because checked exceptions, such as DivideByZeroException, thrown within a method must be either caught by the method or declared in the method's throws clause. Unchecked exceptions, such as ArithmeticException, need not be caught or declared in the throws clause."

2. How the Java virtual machine performs thread synchronization
"To coordinate shared data access among multiple threads, the Java virtual machine associates a lock with each object and class. A lock is like a privilege that only one thread can "possess" at any one time. If a thread wants to lock a particular object or class, it asks the JVM. At some point after the thread asks the JVM for a lock -- maybe very soon, maybe later, possibly never -- the JVM gives the lock to the thread. When the thread no longer needs the lock, it returns it to the JVM. If another thread has requested the same lock, the JVM passes the lock to that thread."

3. How the Java virtual machine handles method invocation and return
"When the Java virtual machine invokes a class method, it selects the method to invoke based on the type of the object reference, which is always known at compile-time. On the other hand, when the virtual machine invokes an instance method, it selects the method to invoke based on the actual class of the object, which may only be known at run time."

4. BEA releases 'world's fastest' JVM
"Version 7.0 focuses on manageability, performance, and support for Intel's 32- and 64-bit architectures, although the 64-bit JVM is not yet available, said Bob Griswold, vice president and general manager of the Java runtime products group at BEA, in San Jose, Calif."

5. The lean, mean, virtual machine
"The "virtual hardware" of the Java Virtual Machine can be divided into four basic parts: the registers, the stack, the garbage-collected heap, and the method area. These parts are abstract, just like the machine they compose, but they must exist in some form in every JVM implementation."

6. JVM to .NET: I'm Not Dead Yet!
"Admittedly, the JVM alone isn't enough to compete with the entire .NET system. In particular, there is a missing "middle-layer" for porting other languages to the JVM (in the .NET system, this "middle-layer" is the IL). However, this problem has been solved on the JVM, too. Per Bothner, the same developer who started Jemacs, has generalized the intermediate representation (IR) used in GNU Kawa, the Java-based Scheme system. This work is making it possible for the Common Lisp and Emacs Lisp ports to come along nicely, and it is also the driving force behind my current work of porting Perl to the JVM. Thus, while the JVM by itself does not provide every piece needed to compete with .NET, such software does exist."

7. Multiprocess JVMs
"Several vendors of specialized JVMs, such as application servers providers, have addressed this issue by creating multiprocess JVMs. These JVMs appear to run several Java processes within one system process. There is also a (free) pure Java library for multiprocessing JVMs, Echidna. If your interest is purely in using multiprocess JVMs, without actually needing to know the technology behind them, you need read no more of this article; instead, go to the Echidna site, download the library and documentation, and make your JVM multiprocess."

8. Exploiting the Java Virtual Machine
"Java application and component developers have a tendency to rely on a popular fiction known as the "vanilla VM configuration." The choice to rely on the VM to provide adequate, scalable runtime facilities for "real world" applications is often made out of lack of understanding, not expediency. This white paper demonstrates why Java developers need a non-trivial understanding of their runtime environment, the Java VM, by illustrating how some of the most common Java development assumptions can be harmful to a real-world Java application. As a concrete example, this paper addresses why relying on the system classpath is not a good idea in several different scenarios."

9. Charles Nutter Discusses JVM Language Summit
"The 2008 JVM Language Summit took place September 24 through 26, 2008, hosted by Sun Microsystems at its Santa Clara campus."

10. The Multi-Tasking Virtual Machine: Building a Highly Scalable JVM
"The proposed extensions and modifications to the JVM have been prototyped as the Multi-Tasking Virtual Machine (MVM). Existing Java bytecodes can run unmodified, enjoying scalability benefits. New applications can take advantage of new abstractions and interfaces currently missing from the Java platform to accomplish a variety of systems programming tasks. "Across all the metrics of scalability we want to improve the well-being of Java programs," remarks Czajkowski. "We are scaling the Java platform and turning it into a complete operating environment, by adding various APIs and extensions so that anything you currently want to do in the domain of systems programming, you can do from within the language.""

11. Java Virtual Machine's Internal Architecture
"The Java virtual machine computes by performing operations on certain types of data. Both the data types and operations are strictly defined by the Java virtual machine specification. The data types can be divided into a set of primitive types and a reference type. Variables of the primitive types hold primitive values, and variables of the reference type hold reference values. Reference values refer to objects, but are not objects themselves. Primitive values, by contrast, do not refer to anything. They are the actual data themselves. You can see a graphical depiction of the Java virtual machine's families of data types in Figure 5-4."

12. Large JVM Memory and Garbage Collection
"However, as Azul Systems' Gil Tene explains in this interview with Artima, the JVM has not been all that efficient when working with memory over a few gigabytes: Garbage collecting such large memory spaces can cause application pauses that may be unacceptable in interactive systems."

13. Errata for Inside the Java Virtual Machine, First Edition
"The following table contains a list of the errata about which I know. Thanks to Marcus Rimmer, who reported a few of these items, and especially to Antoine Trux, who reported probably 80% of them or more. Antoine must have really consumed the book with great intensity to find so many typos and other errors. (He also must have liked it.)"

14. Feedback Page for Bill Venners' Inside the Java Virtual Machine
"To report errata or make comments or suggestion about Inside the Java Virtual Machine, please e-mail me at bv@artima.com. If possible, first look at the list of known errata before making your submission. I heartily welcome all feedback."

15. Fibonacci Forever Java Applet - an Interactive Illustration of the JVM
"The Fibonacci Forever applet, included below, demonstrates a Java Virtual Machine executing a sequence of bytecodes that generate the Fibonacci series. This applet accompanies Chapter 10, "Stack and Local Variable Operations, " of Inside the Java 2 Virtual Machine."

16. Resources for Inside the Java Virtual Machine
"A list of recommended books covering topics covered by Inside the Java Virtual Machine is available at Books Related to the JVM."

17. The Hotspot Virtual Machine
"The Hotspot VM is a collection of techniques, the most significant of which is called "adaptive optimization." In fact, this technique gives Hotspot its name."

18. The Lean, Mean Java Virtual Machine
"This article was first published under the name Under the Hood: The Lean, Mean Virtual Machine in JavaWorld, a division of Web Publishing, Inc., May 1996."

19. Introduction of Inside the Java 2 Virtual Machine by Bill Venners
"Source code file from the book "Inside the Java 2 Virtual Machine," by Bill Venners, published by McGraw-Hill, 1999, ISBN: 0-07-135093-4."

20. Circle of Squares Java Applet - an Interactive Illustration of the JVM
"The Circle of Squares applet, included below, demonstrates a Java virtual machine executing a sequence of bytecodes that perform floating-point arithmetic. This applet accompanies Chapter 14, "Floating Point Arithmetic," of Inside the Java 2 Virtual Machine."

21. Logical Results Java Applet - an Interactive Illustration of the JVM
"The Logical Results applet, included below, demonstrates a Java virtual machine executing a sequence of bytecodes. This applet accompanies Chapter 13, "Logic," of Inside the Java 2 Virtual Machine."

22. Saying Tomato Java Applet - an Interactive Illustrations of the JVM
"The Saying Tomato applet, included below, demonstrates a Java virtual machine executing a sequence of bytecodes. This applet accompanies Chapter 16, "Control Flow," of Inside the Java 2 Virtual Machine."

23. Prime Time Java Applet - an Interactive Illustration of the JVM
"The Prime Time applet, included below, demonstrates a Java virtual machine executing a sequence of bytecodes that generates prime numbers. This applet accompanies Chapter 12, "Integer Arithmetic," of Inside the Java 2 Virtual Machine."

24. Dynamic Language Support on the JVM
"On the eve of Sun's release of Java SE 6, Artima spoke with Coward about the future of dynamic language support on the JVM, about a new bytecode, invokedynamic, explicitly designed to support dynamic languages, about hot-swapping—the ability to change or add a method to a class at runtime—and about the goal of turning the JVM into an ideal target for dynamic language implementation."

25. Conversion Diversion Java Applet - an Interactive Illustration of the JVM
"The Conversion Diversion applet, included below, demonstrates a Java virtual machine executing a sequence of bytecodes that performs type conversion. This applet accompanies Chapter 11, "Type Conversion," of Inside the Java 2 Virtual Machine."

26. Table of Contents of Inside the Java 2 Virtual Machine
"This page describes the contents of the book Inside the Java 2 Virtual Machine by Bill Venners, ISBN 0-07-135093-4, published by McGraw-Hill."

27. Play Ball! Java Applet - an Interactive Illustration of the JVM
"The Play Ball! Applet, included below, demonstrates a Java virtual machine executing a sequence of bytecodes. This applet accompanies Chapter 17, "Exceptions," of Inside the Java 2 Virtual Machine."

28. Getting Loaded Java Applet - an Interactive Illustration of the JVM
"The Getting Loaded applet, included below, simulates a Java virtual machine loading a class file. This applet accompanies Chapter 6, "The Java Class File," of Inside the Java 2 Virtual Machine."

29. Recommended Books on the Java Virtual Machine
"Here I recommend books that are related to the topics I cover in my book, Inside the Java 2 Virtual Machine. Each entry is linked to the page at Amazon.com where you can order the book online."

30. Acknowledgments of Inside the Java 2 Virtual Machine
"I'd like to thank Michael O'Connell, the former Editor-in-Chief of JavaWorld, for giving me the opportunity to write about Java. I'd also like to thank Jill Steinberg, the current Editor-in-Chief, and the rest of the gang at JavaWorld for all their help with my original JavaWorld column, "Under the Hood.""

31. Links to Source Code of the Interactive Illustrations of the JVM
"The Java Virtual Machine Simulator Applets The Java Virtual Machine simulator applets all share a common package, COM.artima.jvmsim, that contains the bulk of the code that performs the simulation. For each individual applet, a class in the unnamed package serves as a "personality module" that customizes the behavior of the COM.artima.jvmsim code. All of these personality module classes descend from class COM.artima.jvmsim.JVMSimulator, which in turn descends from class java.applet.Applet. The personality module classes take as their name the title of the applet they represent. For example, the personality module for the Eternal Math applet is EternalMath.java."

32. Reader Comments for Inside the Java Virtual Machine
"I just finished your book, Inside the Java Virtual Machine, and would like to thank you for a very useful piece of work!"

33. Writer's Choice Award for Inside the Java Virtual Machine
"Java Report asked its contributors for feedback on what they believe to be some of the more exceptional products and tools they had encountered in 1998, and Inside the Java Virtual Machine was one of the chosen products. Here's what Antoine Trux, Java Report author, had to say about the book:"

34. Three Dimensional Array Java Applet - an Interactive Illustration of the JVM
"The Three-Dimensional Array applet, included below, demonstrates a Java virtual machine executing a sequence of bytecodes. This applet accompanies Chapter 15, "Objects and Arrays," of Inside the Java 2 Virtual Machine."

35. Hop Around Java Applet - an Interactive Illustration of the JVM
"The Hop Around applet, included below, demonstrates a Java virtual machine executing a sequence of bytecodes. This applet accompanies Chapter 18, "Finally Clauses," of Inside the Java 2 Virtual Machine."

36. Preface of Inside the Java 2 Virtual Machine
"My primary goal in writing this book was to explain the Java virtual machine, and several core Java APIs closely related to the virtual machine, to Java programmers. Although the Java virtual machine incorporates technologies that had been tried and proven in other programming languages, prior to Java many of these technologies had not yet entered into common use. As a consequence, many programmers will be encountering these technologies for the first time as they begin to program in Java. Garbage collection, multi-threading, exception handling, dynamic extension--even the use of a virtual machine itself--may be new to many programmers. The aim of this book is to help programmers understand how all these things work, and in the process, to help them become more adept at Java programming."

37. Interactive Illustrations for Inside the Java 2 Virtual Machine
"Welcome to Interactive Illustrations, a web companion to the book Inside the Java 2 Virtual Machine by Bill Venners. These web pages contain Java applets that interactively illustrate the concepts presented in the text of the book."

38. Slices of Pi Java Applet - an Interactive Illustration of the JVM
"The Slices of Pi applet, included below, demonstrates a Java virtual machine executing a sequence of bytecodes that calculates pi. This applet is described in Appendix D, "Slices of Pi: A Simulation of the Java Virtual Machine", of Inside the Java 2 Virtual Machine."

39. Eternal Math Java Applet - an Interactive Illustration of the JVM
"The Eternal Math applet, included below, simulates a Java virtual machine executing a few bytecode instructions. This applet accompanies Chapter 5, "The Java Virtual Machine, " of Inside the Java 2 Virtual Machine."

40. Inside the Java Virtual Machine
"The second edition of Bill Venners' Inside the Java Virtual Machine, winner of a 1998 Java Report Writers Choice Award, is now available in bookstores. Inside the Java Virtual Machine explains Java's architecture and internals, and several Java APIs closely tied to the virtual machine, to Java programmers. Reading this book will help you gain a deeper understanding of Java technology, and in the process, help you become more effective at Java programming. This new edition is fully revised for Java 2, and includes much new material on a variety of JVM topics. You can order the book from Amazon by clicking on the image to the right."

41. About the Author of Inside the Java 2 Virtual Machine
"Bill Venners has been writing software professionally for 14 years. Based in Silicon Valley, he provides software consulting and training services through Artima Software Company. Since 1996, he has written over 40 articles about Java technology. His popular columns in JavaWorld magazine have covered Java internals, object-oriented design techniques, and Jini technology. He is also the author and webmaster of artima.com, an online resource for Java and Jini developers. He teaches in-house and public Java training seminars and frequently speaks on Java technology at software conferences around the world. You can reach him at bv@artima.com."

42. Garbage Collection in the Java HotSpot Virtual Machine
"Generational Garbage Collection The Java HotSpot VM uses a generational garbage collector, a well-known technique that exploits the following two observations:"

43. View statistics on Apache Geronimo via the JVM
"The JVM is responsible for loading the classes in your application and classes from libraries that your application's classes use. Thus these could be classes loaded from WARs or EARs that you have deployed in Geronimo, JAR files included in your WAR or EAR, or classes from JARs loaded by the Geronimo container. The JVM can also choose to unload classes if the class has not been used for an extended period of time. This leads to several important statistics: how many classes have been loaded, how many have been unloaded, and how much time has been spent loading and unloading classes."

44. Java theory and practice: Garbage collection in the HotSpot JVM
"Last month, we looked at the classic garbage collection techniques of reference counting, copying, mark-sweep, and mark-compact. Each of these approaches has advantages and disadvantages in certain situations. For example, copying does well when a large proportion of objects are garbage, but does poorly with many long-lived objects (copying them repeatedly). Conversely, mark-compact does quite well with long-lived objects (copying them only once), but not so well with many short-lived objects. The technique used by the 1.2 and later JVMs, called generational garbage collection, combines these two techniques to get the best of both worlds, and as a bonus provides very low object allocation overhead."

45. Classworking toolkit: Use J2SE 5.0 features on older JVMs
"Even though the generated classes specify JDK 5.0 and higher JVMs, that's not the end of the story. Developers have observed that some of the new features actually generate code that's fully compatible with older JVMs, while other features can be made compatible with some minor extensions to the standard libraries. One developer in particular, Toby Reyelts, decided to do something to get around the limitations of the JDK 5.0 compiler. The result is the open source Retroweaver project (see Resources). Retroweaver uses classworking techniques to modify the binary class representations generated by the JDK 5.0 compiler so the classes can be used with earlier JVMs."

46. Gems from e-BIT: Prevent your JVM from terminating on user logout
"Short for reduced signaling, the rs parameter ensures that the JVM will ignore the signal induced by a user logging out. Prior to Java 1.3.0, the JVM did not react to such signals, so the problem did not exist."

47. Eye on performance: Tuning garbage collection in the HotSpot JVM
"The first step in the process was to determine the cause of the sudden application slowdowns. First on our list of suspects was garbage collection. As we demonstrated in last month's column, the easiest way to determine if garbage collection and memory utilization issues are having a negative effect on your applications performance is to set the -verbose:gc JVM option and examine the log output. So we restarted the application with verbose garbage collection logging turned in, and patiently waited for the application's performance to fall off. Our patience paid off in the form of a very revealing gc log file."

48. The Jikes Research Virtual Machine (RVM)
"Jalape??s a virtual machine for Java servers written in the Java language. To be able to address the requirements of servers (performance and scalability in particular), Jalape??as designed "from scratch" to be as self-sufficient as possible. Jalape?? unique object model and memory layout allows a hardware null-pointer check as well as fast access to array elements, fields, and methods. Run-time services conventionally provided in native code are implemented primarily in Java. Java threads are multiplexed by virtual processors (implemented as operating system threads). A family of concurrent object allocators and parallel type-accurate garbage collectors is supported. Jalape?? interoperable compilers enable quasi preemptive thread switching and precise location of object references. Jalape?? dynamic optimizing compiler is designed to obtain high quality code for methods that are observed to be frequently executed or computationally intensive."

49. Performance tuning tips for the IBM JVM for Linux on POWER
"Garbage Collector is one of the most important JVM components influencing JVM performance. General IBM JVM discussion (in IBM JVM Diagnostics Guides for JDK 1.3.1 and JDK 1.4.1) on GC and heap size tuning applies to IBM JVM on Linux, including Linux on POWER, with the exception of some IBM JVM on Linux specifics, discussed below."

50. Garbage collection on Java 1.1.8 JVMs
"You have several options for tuning the garbage collection performance. These options exist as command line arguments on the java command. You can determine what options are available by issuing the java command as follows:"

51. Evolving performance of the Java Virtual Machine
"The history of refinements affecting Java performance is a complicated one, but on the upside it is also one of ever-increasing improvement. In this sidebar to the recent interview, IBM Distinguished Engineer Robert Berry walks us through the successive releases of the JDK and explains the key performance problems addressed in each release."

52. Introduction to IBM JVM for Linux JIT diagnostics
"Paper focuses mainly on JIT diagnostics in case of encountering problems with JIT when migrating from Sun HotSpot JVM to IBM JIT-based JVM."

53. Limiting JVM on VPS (Virtual Private Server)
"Virtual Private Servers are the most advanced and affordable solution for anyone wanting to run their own server. They are used to partition a single physical server into many isolated virtual private servers. Each virtual private server looks and behaves exactly like a real networked server system, complete with its own set of init scripts, users, processes, and file systems. There is one downside to VPS: running Java on it. JVM only sees the computer as it is, 16Gigabytes of RAM and if you are attempting to start up an Application Server, JVM will happily attempt to reserve, say, 2 gigabytes and will not be able to do so in a 512 megabyte account. How can you get around this?"

54. Java 2 Micro Edition and the Kilobyte Virtual Machine
"In Java 2 Micro Edition and the Kilobyte Virtual Machine , we'll delve into the specifics of actually getting your hands dirty writing a J2ME application for the Palm."

55. A Test of Java Virtual Machine Performance
"Prior to Version 1.3, production releases of the Java 2 SDK, Standard Edition for the Solaris Operating Environment included a virtual machine1 implementation known as Exact VM (EVM). With the release of Java 2 SDK, Standard Edition 1.3, EVM is replaced by the Java HotSpot Server VM and the Java HotSpot Client VM. The Java HotSpot Client and Server VMs are designed to deliver a high level of performance for Java technology-based applications, in many cases a higher level of performance than these applications could achieve with EVM. However, as is true for most performance-enhancing tools, the performance of an application can also depend on other factors such as VM options specified at runtime."

w___w__w___._jav___a__2s__.__c_om_ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.