★ wanayoo — archive 1999 http://developer.java.sun.com/developer/community/chat/JavaLive/1997/jl0812a.htmlNouvelle recherche | Portail wanayoo
Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Chat

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
 
JavaLive Transcripts Index

Java Live
JavaTM Runtime Environment
August 12, 1997

Moderator (MDR): MDR-lisa

Guest Speaker (SPK): SPK-dac

MDR-lisa: Hello everyone, welcome to Java Live. I'm Lisa Stapleton (editorial director of the JDC) and our guests today are Dave Connelly and Alan Sommerer. They are here to talk about JRE, the JavaTM Runtime Environment.

pat: Could you give a summary of the JRE?

SPK-dac: The (JRE) Java Runtime Environment is the minimum runtime environment necessary to run Java applications. It does not include any of the development tools (i.e. javac, javah) included with the JDKTM (Java Development Kit). JRE 1.1.3 includes an end-user install which makes it possible to install just a single JRE on the end user's system, and have all Java applications share that. Although it is still possible to bundle in the JRE with your application, you don't necessarily need to do that anymore, as long as it has already been installed.

bst5qi: When a user closes a session while JRE for Windows (jrew.exe) is running a Java application, Windows sends messages like "WM_QUERYENDSESSION" and "WM_ENDSESSION" to every running application. But the Java application is not informed about this event and has no possibility of doing cleanup stuff. Will this be fixed in JDK 1.2?

SPK-dac: Good question! This looks like a problem with the AWT. I'll forward the request to the AWT group and see if this will be fixed for 1.2.

binli: In JavaSoft's JIT documentation, they list the ways to use JIT with javac. Why is this necessary? I thought javac is used to create platform-neutral bytecode.

SPK-dac: The documentation merely explains how to use the JIT in order to improve the compilation performance of javac. javac still generates platform-neutral bytecode.

jimheintz: You mentioned that JRE does not contain javac. Does this mean that java.lang.Compiler is not present in JRE?

SPK-dac: The JRE does not contain javac. The classes for javac are in sun.tools.*. The class java.lang.Compiler has nothing to do with javac, but is actually the interface for a JIT compiler.

MDR-lisa: I understand that there are some really nice optimizations in the upcoming HotSpot work, will these be included in the JRE? Maybe you'd like to talk about what they'll be?

SPK-dac: Yes. The new HotSpot technology will be included in JRE as well as the JDK. The expected performance improvement over JIT compilers (including the JIT currently bundled in the JRE and JDK) will be dramatic.

MDR-lisa: I understand that you won't have to do annoying things like inlining code? Are there other ways that this technology will change the way people should write their programs?

SPK-dac: In order to benefit the most from the added performance of a JIT compiler, you typically need to write your Java code almost as if it were written in C. With the new HotSpot compiler technology, which does extensive inlining of method calls, this will no longer be necessary.

kdlitwak: Is it safe to assume that the JRE will support all the functions currently available in the JRE—I don't mean javac, which it obviously doesn't-- I am thinking rather of RMI, or other networking suppor?

SPK-alans1: Future versions of the JRE will support all functionality of the current JRE. With only a few exceptions as listed on the compatibility web page, all Java code that works with the current JDK and JRE will work with future versions.

SPK-dac: Anyone out there thinking of using or bundling the JRE in with their application(s)?

kdlitwak: Yes, dac, I am. I assume that I can't depend upon an end user to have that installed. I do hope there will be a way to do his, however, without the end user having to do a bunch of admin, like precise setting of the classpath, etc.

SPK-dac: If you are using InstallShield, it is actually easy to bundle the JRE setup.exe program in with your application. Even though this makes the download bigger, you can first check if a JRE is already installed and avoid installing another copy in that case. InstallShield also provides a way to automatically run the JRE setup.exe in "batch" mode so that additional user interaction is not required. More details on this will be provided on the JRE Notes for Developers page at our web site. The URL is http://www.javasoft.com/products/JDK/1.1/runtime.html

bst5qi: What are the performance enhancements in JRE.EXE 1.1.3 in comparison to JAVA.EXE 1.1.3 or older versions of JRE.EXE?

SPK-dac: Both the JRE and JDK share the same runtime, so in terms of performance they are equivalent. The JPP (Java Performance Pack) will install a JIT compiler for both JDK and JRE to boot performance even further. This add-on JIT compiler was introduced for JDK/JRE 1.1.3.

bst5qi: I have a question not directly concerned with the topic. I'm wondering if I can use the JAR files of Swing 0.3 for Windows NT (also under OS/2) with JDK 1.1.1 only, or if these JAR files are platform-dependent. Thanks.

SPK-dac: I don't work directly on Swing, but did work on some of the JAR support for 1.1.x. As far as I know, the Swing toolkit does not include any platform-specific native code. So as long as the JDK for OS/2 fully supports 1.1.1, I don't see why this should be a problem. If it is, let me know and I'll forward a bug report to the appropriate person(s).

jarl: I don't know if you already discussed it because I just joined, but in the early discussions about HotSpot there was mention of a "breakthrough" in synchronization implementation to make these "practically free." It was not disclosed as there were patent issues or something. Could you comment on the technique now?

SPK-dac: I can't talk about things in detail, but synchronization performance will be dramatically improved in the new HotSpot interpreter. As you pointed out, synchronization on objects where there is no contention for the lock will be practically free.

MDR-lisa: Are there any enhancements/new features that people would like to see in the upcoming releases of the JRE/JIT?

bst5qi: For future implementations of JRE, I strongly wish that of image formats not only GIF and JPEG are supported, but also PNG, which seems to me to be the most flexible and suitable image format for the Internet, Java, and so on.

SPK-dac: I'm not sure, but PNG might be supported in the new Java2D APIs for JDK/JRE 1.2. You might want to check out the Java2D preview doc on our web site at URL http://www.javasoft.com/products/jfc.index.html

bst5qi: Furthermore, I would be happy if in future releases of JRE there will be more control over memory allocation and handling OutOfMemoryErrors (seldom, but possibly) and garbage collection. I have noticed that JRE only allocates memory from the OS, but never deallocates anymore, and that its memory consumption is huge.

SPK-dac: The new garbage collector in HotSpot will further enhance allocation performance, as well as more effectively deallocate memory that is no longer used. The current GC in the JDK 1.x is based on a rather outdated design that was initially developed for use on small, embedded devices with a fixed memory size.

MDR-lisa: Now might also be a good time to ask where people can download the latest JRE release.

SPK-dac: You can download the latest JRE from our web site at http://www.javasoft.com/products/jdk/1.1/jre A preview version of the JIT compiler (aka Java Performance Pack) is available from http://www.javasoft.com/products/jdk/1.1

jarl: What is the typical cost of transferring execution control from JRE to native code and back, using the JNI?

SPK-dac: If you write your native code to take advantage of caching method and field IDs, JNI can be as fast as the old native code interface. In some cases, it can be even faster especially in combination with a JIT compiler.

bst5qi: Will the performance of other critical points like object creation, exception handling, event handling, and repainting large numbers of lightweight components also be improved in HotSpot?

SPK-dac: All of the things you mention will be faster in HotSpot, some to a greater degree than others. This has been a concern for the new AWT enhancements since the the new lightweight component model involves the generation of many small objects and the HotSpot developers have been particularly aware of that.

MDR-lisa: We're very grateful to David Connelly and Alan Sommerer for participating in this forum on the JRE, and thanks so much to all the participants. Be sure to join us next week, for another session of Java Live.


[ This page was updated: 12-Jan-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.