Java Platform, Standard Edition Tools Reference

Total Page:16

File Type:pdf, Size:1020Kb

Java Platform, Standard Edition Tools Reference Java Platform, Standard Edition Tools Reference Release 9 E61612-05 October 2017 Java Platform, Standard Edition Tools Reference, Release 9 E61612-05 Copyright © 1993, 2017, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency- specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle. Contents Preface Audience vi Documentation Accessibility vi Related Documents vi Conventions vi 1 Tools and Commands Reference 2 Main Tools to Create and Build Applications javac 2-1 Annotation Processing 2-21 Searching for Types 2-22 javap 2-23 javah 2-26 javadoc 2-28 java 2-44 java Command-Line Argument Files 2-88 Enable Logging with the JVM Unified Logging Framework 2-91 Validate Java Virtual Machine Flag Arguments 2-100 Large Pages 2-100 Application Class Data Sharing 2-102 Performance Tuning Examples 2-105 Exit Status 2-106 appletviewer 2-106 AppletViewer Tags 2-107 jar 2-110 jlink 2-115 jmod 2-121 jdeps 2-126 jdeprscan 2-130 iii 3 Language Shell jshell 3-1 4 Security Tools and Commands keytool 4-1 jarsigner 4-26 policytool 4-42 kinit 4-42 klist 4-44 ktab 4-46 5 Remote Method Invocation (RMI) Tools and Commands rmic 5-1 rmiregistry 5-5 rmid 5-6 serialver 5-11 6 Java IDL and RMI-IIOP Tools and Commands tnameserv 6-1 idlj 6-6 orbd 6-12 servertool 6-16 7 Java Deployment Tools and Commands pack200 7-1 unpack200 7-5 javapackager 7-6 8 Java Web Start Tool javaws 8-1 9 Monitoring Tools and Commands jconsole 9-1 jps 9-2 jstat 9-5 iv jstatd 9-12 jmc 9-14 10 Web Services Tools and Commands schemagen 10-1 wsgen 10-2 wsimport 10-4 xjc 10-7 11 Java Accessibility Utilities and Commands jaccessinspector 11-1 jaccesswalker 11-5 12 Troubleshooting Tools and Commands jcmd 12-1 jdb 12-14 jhsdb 12-17 jinfo 12-20 jmap 12-21 jstack 12-22 13 Script Commands jjs 13-1 jrunscript 13-3 v Preface Preface The Java Platform, Standard Edition (Java SE) Command Reference describes the valid options and arguments for Java SE commands. In many cases, examples are included to show correct usage. Audience This document is intended for Java SE developers who want to use the tools and commands provided in JDK 9. Documentation Accessibility For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup? ctx=acc&id=docacc. Access to Oracle Support Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/ lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired. Related Documents For more information, see the documents in the Oracle JDK 9 Documentation Conventions The following text conventions are used in this document: Convention Meaning boldface Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary. italic Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values. monospace Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter. vi 1 Tools and Commands Reference The JDK tools and their commands enable developers to handle development tasks such as compiling and running a program, packaging source files into a Java Archive (JAR) file, applying security policies to a JAR file, and more. The tools and commands reference topic lists and describes the Java Development Kit (JDK) tools. They’re grouped into the following sections based on the related functions that they perform. Details about the tools and the commands that you use to run them are contained in the corresponding sections of this guide. Main Tools The following foundation tools and commands let you create and build applications: • javac: You can use the javac tool and its options to read Java class and interface definitions and compile them into bytecode and class files. • javap: You use the javap command to disassemble one or more class files. • javah: You use the javah tool to generate C header and source files from a Java class. • javadoc: You use the javadoc tool and its options to generate HTML pages of API documentation from Java source files. • java: You can use the java command to launch a Java application. • appletviewer: You use the appletviewer command to launch the AppletViewer and run applets outside of a web browser. • jar: You can use the jar command to create an archive for classes and resources, and to manipulate or restore individual classes or resources from an archive. • jlink: You can use the jlink tool to assemble and optimize a set of modules and their dependencies into a custom runtime image. • jmod: You use the jmod tool to create JMOD files and list the content of existing JMOD files. • jdeps: You use the jdeps command to launch the Java class dependency analyzer. • jdeprscan: You use the jdeprscan tool as a static analysis tool that scans a jar file (or some other aggregation of class files) for uses of deprecated API elements. Language Shell The following tool gives you an interactive environment for trying out the Java language: • jshell: You use the jshell tool to interactively evaluate declarations, statements, and expressions of the Java programming language in a read-eval-print loop (REPL). 1-1 Chapter 1 Security Tools The following security tools set security policies on your system and create applications that can work within the scope of security policies set at remote sites: • keytool: You use the keytool command and options to manage a keystore (database) of cryptographic keys, X.509 certificate chains, and trusted certificates. • jarsigner: You use the jarsigner tool to sign and verify Java Archive (JAR) files. • policytool: You use policytool to read and write a plain text policy file based on user input through the utility GUI. The following tools obtain, list, and manage Kerberos tickets on Windows: • kinit: You use the kinit tool and its options to obtain and cache Kerberos ticket- granting tickets. • klist: You use the klist tool to display the entries in the local credentials cache and key table. • ktab: You use the ktab tool to manage the principal names and service keys stored in a local key table. Remote Method Invocation (RMI) Tools The following tools enable creating applications that interact over the Web or other network: • rmic: You use the rmic compiler to generate stub and skeleton class files using the Java Remote Method Protocol (JRMP) and stub and tie class files (IIOP protocol) for remote objects.
Recommended publications
  • SJC – Small Java Compiler
    SJC – Small Java Compiler User Manual Stefan Frenz Translation: Jonathan Brase original version: 2011/06/08 latest document update: 2011/08/24 Compiler Version: 182 Java is a registered trademark of Oracle/Sun Table of Contents 1 Quick introduction.............................................................................................................................4 1.1 Windows...........................................................................................................................................4 1.2 Linux.................................................................................................................................................5 1.3 JVM Environment.............................................................................................................................5 1.4 QEmu................................................................................................................................................5 2 Hello World.......................................................................................................................................6 2.1 Source Code......................................................................................................................................6 2.2 Compilation and Emulation...............................................................................................................8 2.3 Details...............................................................................................................................................9
    [Show full text]
  • Introduction to Java
    Introduction to Java James Brucker What is Java? Java is a language for writing computer programs. it runs on almost any "computer". desktop mobile phones game box web server & web apps smart devices What Uses Java? OpenOffice & LibreOffice (like Microsoft Office) Firefox Google App Engine Android MindCraft & Greenfoot IDE: Eclipse, IntelliJ, NetBeans How Java Works: Compiling 1. You (programmer) write source code in Java. 2. A compiler (javac) checks the code and translates it into "byte code" for a "virtual machine". Java Java source Hello.java javac Hello.class byte code code compiler public class Hello { public Hello(); aload_0 public static void main( String [ ] args ) { invokespecial #1; //Method java/ System.out.println( "I LOVE programming" ); lang/Object."<init>":()V return } main(java.lang.String[]); } getstatic #2; //Field ... How Java Works: Run the Bytecode 3. Run the byte code in a Java Virtual Machine (JVM). 4. The JVM (java command) interprets the byte code and loads other code from libraries as needed. Java I LOVE programming byte Hello.class java code java virtual public Hello(); aload_0 machine invokespecial #1; //Method java/lang/Object."<init>":()V return main(java.lang.String[]); Other java classes, getstatic #2; //Field ... saved in libraries. Summary: How Java Works 1. You (programmer) write program source code in Java. 2. Java compiler checks the code and translates it into "byte code". 3. A Java virtual machine (JVM) runs the byte code. Libraries Hello, javac Hello.class java Hello.java World! Java compiler byte code JVM: Program source - load byte code execution program - verify the code - runs byte code - enforce security model How to Write Source Code? You can use any editor to write the Java source code.
    [Show full text]
  • Java Programming Standards & Reference Guide
    Java Programming Standards & Reference Guide Version 3.2 Office of Information & Technology Department of Veterans Affairs Java Programming Standards & Reference Guide, Version 3.2 REVISION HISTORY DATE VER. DESCRIPTION AUTHOR CONTRIBUTORS 10-26-15 3.2 Added Logging Sid Everhart JSC Standards , updated Vic Pezzolla checkstyle installation instructions and package name rules. 11-14-14 3.1 Added ground rules for Vic Pezzolla JSC enforcement 9-26-14 3.0 Document is continually Raymond JSC and several being edited for Steele OI&T noteworthy technical accuracy and / PD Subject Matter compliance to JSC Experts (SMEs) standards. 12-1-09 2.0 Document Updated Michael Huneycutt Sr 4-7-05 1.2 Document Updated Sachin Mai L Vo Sharma Lyn D Teague Rajesh Somannair Katherine Stark Niharika Goyal Ron Ruzbacki 3-4-05 1.0 Document Created Sachin Sharma i Java Programming Standards & Reference Guide, Version 3.2 ABSTRACT The VA Java Development Community has been establishing standards, capturing industry best practices, and applying the insight of experienced (and seasoned) VA developers to develop this “Java Programming Standards & Reference Guide”. The Java Standards Committee (JSC) team is encouraging the use of CheckStyle (in the Eclipse IDE environment) to quickly scan Java code, to locate Java programming standard errors, find inconsistencies, and generally help build program conformance. The benefits of writing quality Java code infused with consistent coding and documentation standards is critical to the efforts of the Department of Veterans Affairs (VA). This document stands for the quality, readability, consistency and maintainability of code development and it applies to all VA Java programmers (including contractors).
    [Show full text]
  • Java (Programming Langua a (Programming Language)
    Java (programming language) From Wikipedia, the free encyclopedialopedia "Java language" redirects here. For the natural language from the Indonesian island of Java, see Javanese language. Not to be confused with JavaScript. Java multi-paradigm: object-oriented, structured, imperative, Paradigm(s) functional, generic, reflective, concurrent James Gosling and Designed by Sun Microsystems Developer Oracle Corporation Appeared in 1995[1] Java Standard Edition 8 Update Stable release 5 (1.8.0_5) / April 15, 2014; 2 months ago Static, strong, safe, nominative, Typing discipline manifest Major OpenJDK, many others implementations Dialects Generic Java, Pizza Ada 83, C++, C#,[2] Eiffel,[3] Generic Java, Mesa,[4] Modula- Influenced by 3,[5] Oberon,[6] Objective-C,[7] UCSD Pascal,[8][9] Smalltalk Ada 2005, BeanShell, C#, Clojure, D, ECMAScript, Influenced Groovy, J#, JavaScript, Kotlin, PHP, Python, Scala, Seed7, Vala Implementation C and C++ language OS Cross-platform (multi-platform) GNU General Public License, License Java CommuniCommunity Process Filename .java , .class, .jar extension(s) Website For Java Developers Java Programming at Wikibooks Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few impimplementation dependencies as possible.ble. It is intended to let application developers "write once, run ananywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to rurun on another. Java applications ns are typically compiled to bytecode (class file) that can run on anany Java virtual machine (JVM)) regardless of computer architecture. Java is, as of 2014, one of tthe most popular programming ng languages in use, particularly for client-server web applications, witwith a reported 9 million developers.[10][11] Java was originallyy developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems'Micros Java platform.
    [Show full text]
  • Exceptions and Libraries
    9/7/2016 Exceptions and Libraries RS 9.3, 6.4 Some slides created by Marty Stepp http://www.cs.washington.edu/143/ Edited by Sarah Heckman CSC216: Programming Concepts –Java © NC State CSC216 Faculty 1 Exceptions • exception: An object representing an error or unusual condition. – unchecked exceptions: One that does not have to be handled for the program to compile – checked exception: One that must be handled for the program to compile. • What are some unchecked and checked exceptions? • What may cause unchecked or checked exceptions? • For any checked exception, you must either: –also throw that exception yourself – catch (handle) the exception CSC216: Programming Concepts –Java © NC State CSC216 Faculty 2 1 9/7/2016 Throwing an exception public type name(params) throws type { • throws clause: Keywords on a method's header that states that the method may generate an exception. – You only need to list the checked exceptions for compilation – Good form to list all exceptions (including unchecked exceptions) –Example: public class ReadFile { public static void main(String[] args) throws FileNotFoundException { } "I hereby announce that this method might throw an exception, and the caller must accept the consequences if it happens." CSC216: Programming Concepts –Java © NC State CSC216 Faculty 3 Catching an exception try { statement(s); } catch (ExceptionType name) { code to handle the exception } – The try code executes – at least one statement should potentially cause an exception • A method call that throws an exception – If the exception
    [Show full text]
  • Configuring & Using Apache Tomcat 4 a Tutorial on Installing and Using
    Configuring & Using Apache Tomcat 4 A Tutorial on Installing and Using Tomcat for Servlet and JSP Development Taken from Using-Tomcat-4 found on http://courses.coreservlets.com Following is a summary of installing and configuring Apache Tomcat 4 for use as a standalone Web server that supports servlets 2.3 and JSP 1.2. Integrating Tomcat as a plugin within the regular Apache server or a commercial Web server is more complicated (for details, see http://jakarta.apache.org/tomcat/tomcat-4.0-doc/). Integrating Tomcat with a regular Web server is valuable for a deployment scenario, but my goal here is to show how to use Tomcat as a development server on your desktop. Regardless of what deployment server you use, you'll want a standalone server on your desktop to use for development. (Note: Tomcat is sometimes referred to as Jakarta Tomcat since the Apache Java effort is known as "The Jakarta Project"). The examples here assume you are using Windows, but they can be easily adapted for Solaris, Linux, and other versions of Unix. I've gotten reports of successful use on MacOS X, but don't know the setup details. Except when I refer to specific Windows paths (e.g., C:\blah\blah), I use URL-style forward slashes for path separators (e.g., install_dir/webapps/ROOT). Adapt as necessary. The information here is adapted from More Servlets and JavaServer Pages from Sun Microsystems Press. For the book table of contents, index, source code, etc., please see http://www.moreservlets.com/. For information on servlet and JSP training courses (either at public venues or on-site at your company), please see http://courses.coreservlets.com.
    [Show full text]
  • The Java® Language Specification Java SE 8 Edition
    The Java® Language Specification Java SE 8 Edition James Gosling Bill Joy Guy Steele Gilad Bracha Alex Buckley 2015-02-13 Specification: JSR-337 Java® SE 8 Release Contents ("Specification") Version: 8 Status: Maintenance Release Release: March 2015 Copyright © 1997, 2015, Oracle America, Inc. and/or its affiliates. 500 Oracle Parkway, Redwood City, California 94065, U.S.A. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. The Specification provided herein is provided to you only under the Limited License Grant included herein as Appendix A. Please see Appendix A, Limited License Grant. To Maurizio, with deepest thanks. Table of Contents Preface to the Java SE 8 Edition xix 1 Introduction 1 1.1 Organization of the Specification 2 1.2 Example Programs 6 1.3 Notation 6 1.4 Relationship to Predefined Classes and Interfaces 7 1.5 Feedback 7 1.6 References 7 2 Grammars 9 2.1 Context-Free Grammars 9 2.2 The Lexical Grammar 9 2.3 The Syntactic Grammar 10 2.4 Grammar Notation 10 3 Lexical Structure 15 3.1 Unicode 15 3.2 Lexical Translations 16 3.3 Unicode Escapes 17 3.4 Line Terminators 19 3.5 Input Elements and Tokens 19 3.6 White Space 20 3.7 Comments 21 3.8 Identifiers 22 3.9 Keywords 24 3.10 Literals 24 3.10.1 Integer Literals 25 3.10.2 Floating-Point Literals 31 3.10.3 Boolean Literals 34 3.10.4 Character Literals 34 3.10.5 String Literals 35 3.10.6 Escape Sequences for Character and String Literals 37 3.10.7 The Null Literal 38 3.11 Separators
    [Show full text]
  • Solutions to Exercises
    533 Appendix Solutions to Exercises Chapters 1 through 10 close with an “Exercises” section that tests your understanding of the chapter’s material through various exercises. Solutions to these exercises are presented in this appendix. Chapter 1: Getting Started with Java 1. Java is a language and a platform. The language is partly patterned after the C and C++ languages to shorten the learning curve for C/C++ developers. The platform consists of a virtual machine and associated execution environment. 2. A virtual machine is a software-based processor that presents its own instruction set. 3. The purpose of the Java compiler is to translate source code into instructions (and associated data) that are executed by the virtual machine. 4. The answer is true: a classfile’s instructions are commonly referred to as bytecode. 5. When the virtual machine’s interpreter learns that a sequence of bytecode instructions is being executed repeatedly, it informs the virtual machine’s Just In Time (JIT) compiler to compile these instructions into native code. 6. The Java platform promotes portability by providing an abstraction over the underlying platform. As a result, the same bytecode runs unchanged on Windows-based, Linux-based, Mac OS X–based, and other platforms. 7. The Java platform promotes security by providing a secure environment in which code executes. It accomplishes this task in part by using a bytecode verifier to make sure that the classfile’s bytecode is valid. 8. The answer is false: Java SE is the platform for developing applications and applets. 533 534 APPENDIX: Solutions to Exercises 9.
    [Show full text]
  • Perspectives on Free and Open Source Software.Pdf
    Perspectives on Free and Open Source Software Perspectives on Free and Open Source Software edited by Joseph Feller, Brian Fitzgerald, Scott A. Hissam, and Karim R. Lakhani The MIT Press Cambridge, Massachusetts London, England © 2005 Massachusetts Institute of Technology All rights reserved. No part of this book may be reproduced in any form by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher. MIT Press books may be purchased at special quantity discounts for business or sales promotional use. For information, please e-mail [email protected] or write to Special Sales Department, The MIT Press, 5 Cambridge Center, Cambridge, MA 02142. This book was set in Stone sans and Stone serif by SNP Best-set Typesetter Ltd., Hong Kong. Printed and bound in the United States of America. Library of Congress Cataloging-in-Publication Data Perspectives on free and open source software / edited by Joseph Feller . [et al.]. p. cm. Includes bibliographical references and index. ISBN 0-262-06246-1 (alk. paper) 1. Shareware (Computer software) 2. Open source software. 3. Computer software—Development. I. Feller, Joseph, 1972– QA76.76.S46P47 2005 005.36—dc22 2004064954 10987654321 My love, thanks and humble apologies go to my very patient and supportive family: Carol, Caelen, Damien, and Dylan. JF Arís as Gaeilge: Buíochas mór le mo chlann, Máire, Pól agus Eimear. Is mór agam an iarracht a rinne sibh ar mo shon. BF With heartfelt warmth, I dedicate this book to my wife, Jacqueline, and my two sons, Derek and Zachery, who bring meaning to everything I do.
    [Show full text]
  • Building Useful Program Analysis Tools Using an Extensible Java Compiler
    Building Useful Program Analysis Tools Using an Extensible Java Compiler Edward Aftandilian, Raluca Sauciuc Siddharth Priya, Sundaresan Krishnan Google, Inc. Google, Inc. Mountain View, CA, USA Hyderabad, India feaftan, [email protected] fsiddharth, [email protected] Abstract—Large software companies need customized tools a specific task, but they fail for several reasons. First, ad- to manage their source code. These tools are often built in hoc program analysis tools are often brittle and break on an ad-hoc fashion, using brittle technologies such as regular uncommon-but-valid code patterns. Second, simple ad-hoc expressions and home-grown parsers. Changes in the language cause the tools to break. More importantly, these ad-hoc tools tools don’t provide sufficient information to perform many often do not support uncommon-but-valid code code patterns. non-trivial analyses, including refactorings. Type and symbol We report our experiences building source-code analysis information is especially useful, but amounts to writing a tools at Google on top of a third-party, open-source, extensible type-checker. Finally, more sophisticated program analysis compiler. We describe three tools in use on our Java codebase. tools are expensive to create and maintain, especially as the The first, Strict Java Dependencies, enforces our dependency target language evolves. policy in order to reduce JAR file sizes and testing load. The second, error-prone, adds new error checks to the compilation In this paper, we present our experience building special- process and automates repair of those errors at a whole- purpose tools on top of the the piece of software in our codebase scale.
    [Show full text]
  • Apache Harmony Project Tim Ellison Geir Magnusson Jr
    The Apache Harmony Project Tim Ellison Geir Magnusson Jr. Apache Harmony Project http://harmony.apache.org TS-7820 2007 JavaOneSM Conference | Session TS-7820 | Goal of This Talk In the next 45 minutes you will... Learn about the motivations, current status, and future plans of the Apache Harmony project 2007 JavaOneSM Conference | Session TS-7820 | 2 Agenda Project History Development Model Modularity VM Interface How Are We Doing? Relevance in the Age of OpenJDK Summary 2007 JavaOneSM Conference | Session TS-7820 | 3 Agenda Project History Development Model Modularity VM Interface How Are We Doing? Relevance in the Age of OpenJDK Summary 2007 JavaOneSM Conference | Session TS-7820 | 4 Apache Harmony In the Beginning May 2005—founded in the Apache Incubator Primary Goals 1. Compatible, independent implementation of Java™ Platform, Standard Edition (Java SE platform) under the Apache License 2. Community-developed, modular architecture allowing sharing and independent innovation 3. Protect IP rights of ecosystem 2007 JavaOneSM Conference | Session TS-7820 | 5 Apache Harmony Early history: 2005 Broad community discussion • Technical issues • Legal and IP issues • Project governance issues Goal: Consolidation and Consensus 2007 JavaOneSM Conference | Session TS-7820 | 6 Early History Early history: 2005/2006 Initial Code Contributions • Three Virtual machines ● JCHEVM, BootVM, DRLVM • Class Libraries ● Core classes, VM interface, test cases ● Security, beans, regex, Swing, AWT ● RMI and math 2007 JavaOneSM Conference | Session TS-7820 |
    [Show full text]
  • SUBJECT-COMPUTER CLASS-12 CHAPTER 9 – Compiling and Running Java Programs
    SUBJECT-COMPUTER CLASS-12 CHAPTER 9 – Compiling and Running Java Programs Introduction to Java programming JAVA was developed by Sun Microsystems Inc in 1991, later acquired by Oracle Corporation. It was developed by James Gosling and Patrick Naughton. It is a simple programming language. Writing, compiling and debugging a program is easy in java. It helps to create modular programs and reusable code. Bytecode javac compiler of JDK compiles the java source code into bytecode so that it can be executed by JVM. The bytecode is saved in a .class file by compiler. Java Virtual Machine (JVM) This is generally referred as JVM. Before, we discuss about JVM lets see the phases of program execution. Phases are as follows: we write the program, then we compile the program and at last we run the program. 1) Writing of the program is of course done by java programmer. 2) Compilation of program is done by javac compiler, javac is the primary java compiler included in java development kit (JDK). It takes java program as input and generates java bytecode as output. 3) In third phase, JVM executes the bytecode generated by compiler. This is called program run phase. So, now that we understood that the primary function of JVM is to execute the bytecode produced by compiler. Characteristics of Java Simple Java is very easy to learn, and its syntax is simple, clean and easy to understand. Multi-threaded Multithreading capabilities come built right into the Java language. This means it is possible to build highly interactive and responsive apps with a number of concurrent threads of activity.
    [Show full text]