Java on Solaris 7 Developer's Guide

Java on Solaris 7 Developer's Guide

Java on Solaris 7 Developer’s Guide Sun Microsystems, Inc. 901 San Antonio Road Palo Alto, CA 94303-4900 U.S.A. Part No: 805-4031–10 October, 1998 Copyright 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California 94303-4900 U.S.A. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, SunSoft, SunDocs, SunExpress, JavaSoft, Java,Java WorkShop,JDK and Solaris are trademarks, registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and SunTM Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements. RESTRICTED RIGHTS: Use, duplication, or disclosure by the U.S. Government is subject to restrictions of FAR 52.227–14(g)(2)(6/87) and FAR 52.227–19(6/87), or DFAR 252.227–7015(b)(6/95) and DFAR 227.7202–3(a). DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. Copyright 1998 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, Californie 94303-4900 Etats-Unis. Tous droits réservés. Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l’utilisation, la copie, la distribution, et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelque moyen que ce soit, sans l’autorisation préalable et écrite de Sun et de ses bailleurs de licence, s’il y en a. Le logiciel détenu par des tiers, et qui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié par des fournisseurs de Sun. Des parties de ce produit pourront être dérivées du système Berkeley BSD licenciés par l’Université de Californie. UNIX est une marque déposée aux Etats-Unis et dans d’autres pays et licenciée exclusivement par X/Open Company, Ltd. Sun, Sun Microsystems, le logo Sun, SunSoft, SunDocs, SunExpress, JavaSoft, Java,Java WorkShop,JDK et Solaris sont des marques de fabrique ou des marques déposées, ou marques de service, de Sun Microsystems, Inc. aux Etats-Unis et dans d’autres pays. Toutes les marques SPARC sont utilisées sous licence et sont des marques de fabrique ou des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d’autres pays. Les produits portant les marques SPARC sont basés sur une architecture développée par Sun Microsystems, Inc. L’interface d’utilisation graphique OPEN LOOK et SunTM a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés. Sun reconnaît les efforts de pionniers de Xerox pour la recherche et le développement du concept des interfaces d’utilisation visuelle ou graphique pour l’industrie de l’informatique. Sun détient une licence non exclusive de Xerox sur l’interface d’utilisation graphique Xerox, cette licence couvrant également les licenciés de Sun qui mettent en place l’interface d’utilisation graphique OPEN LOOK et qui en outre se conforment aux licences écrites de Sun. CETTE PUBLICATION EST FOURNIE “EN L’ETAT” ET AUCUNE GARANTIE, EXPRESSE OU IMPLICITE, N’EST ACCORDEE, Y COMPRIS DES GARANTIES CONCERNANT LA VALEUR MARCHANDE, L’APTITUDE DE LA PUBLICATION A REPONDRE A UNE UTILISATION PARTICULIERE, OU LE FAIT QU’ELLE NE SOIT PAS CONTREFAISANTE DE PRODUIT DE TIERS. CE DENI DE GARANTIE NE S’APPLIQUERAIT PAS, DANS LA MESURE OU IL SERAIT TENU JURIDIQUEMENT NUL ET NON AVENU. Please Recycle Contents Preface v 1. Introduction 1 Java And The Java Runtime Environment (JRE) 1 Java 1 JRE 2 JVM 3 The Sun Just-In-Time(JIT) Compiler 5 2. Multithreading 9 Definition Of Multithreading* 9 Java Threads In The Solaris Environment - Earlier Releases* 9 Multithreading Concepts* 10 Benefits of Multithreading* 10 Multithreading Models 11 Many-to-One Model (Green Threads) 12 One-to-One Model 13 Many-to-Many Model (Java on Solaris —Native Threads) 14 The MT Kernel 15 Advantages of Java MT On Solaris 16 Grouping Threads 18 Contents iii Java Threads Issues 19 Generic Java Issues 19 Solaris-Specific Issues 19 3. The Java Programming Environment 21 Java Programs 22 An Application 23 An Applet 23 javald and Relocatable Applications 24 Programming Compute-Bound, Parallellized Java Applications 25 thr_setconcurrency(3T) Example 25 API Mapping 27 Thread Group Methods 29 Java Development Tools 30 Java WorkShopTM (JWS) 30 4. Deprecated Methods 33 What Is Deprecation?* 33 Deprecated Threads Methods 38 5. Application Performance Tuning 43 Tuning Techniques 43 System Interface Level 43 iv Java on Solaris 7 Developer’s Guide ♦ October, 1998 Preface The Java On Solaris 7 Developer’s Guide gives JavaTM developers information about using Java in the SolarisTM 2.6 and Solaris 7 environments. This information includes overviews and descriptions of the important components of Java on Solaris software, their benefits for developers, and how to use Java on Solaris software to get the best application performance. In addition, this document covers compatibility issues. Who Should Use This Book This book is intended primarily for these audiences: Developers who are new to Java on Solaris software Developers new to Java. Information for this audience will be starred(*). How This Book Is Organized Chapter 1, "Introduction", is an overview of subjects covered in this book. Chapter 2, "Multithreading", discusses the basics of multithreading, and the benefits of using the native-threaded Java Virtual Machine (JVM) on Solaris. Chapter 3, "The Java Programming Environment", describes this environment with information specific to using Java on multithreaded Solaris. Chapter 4, "Deprecated Methods", lists those methods that have been deprecated as of Java Development Kit (JDKTM 1.1). Preface v Chapter 5, "Application Performance Tuning", describes ways in which Java developers can increase their applications’ performance. Related Documentation For up-to-date information about Java on Solaris software, refer to www.sun.com/solaris/java For information about Java coding style, see dp-websvr.eng.sun.com/products/jpt/ Ordering Sun Documents The SunDocsSM program provides more than 250 manuals from Sun MicrosystemsTM . If you live in the United States, Canada, Europe, or Japan, you can purchase documentation sets or individual manuals using this program. For a list of documents and how to order them, see the catalog section of SunExpressTM Internet site at http://www.sun.com/sunexpress. What Typographic Changes Mean Table P–1 describes the typographic changes used in this book. vi Java on Solaris 7 Developer’s Guide ♦ October, 1998 TABLE P–1 Typographic Conventions Typeface or Meaning Example Symbol AaBbCc123 The names of commands, Edit your .login file. files, and directories; Use ls -a to list all files. on-screen computer output machine_name% You have mail. AaBbCc123 What you type, contrasted machine_name% su with on-screen computer Password: output AaBbCc123 Command-line placeholder: To delete a file, type rm filename. replace with a real name or value AaBbCc123 Book titles, new words or Read Chapter 6 in User’s Guide. These terms, or words to be are called class options. emphasized You must be root to do this. Shell Prompts in Command Examples Table P–2 shows the default system prompt and superuser prompt for the C shell, Bourne shell, and Korn shell. TABLE P–2 Shell Prompts Shell Prompt C shell prompt machine_name% C shell superuser prompt machine_name# Bourne shell and Korn shell prompt $ Bourne shell and Korn shell superuser prompt # vii viii Java on Solaris 7 Developer’s Guide ♦ October, 1998 CHAPTER 1 Introduction This Developer’s Guide describes features of and information about application development using Java in the Solaris 2.6 and Solaris 7 environments. Note - For important information about this release of Java on Solaris software, refer to http://www.sun.com/solaris/java/ Java And The Java Runtime Environment (JRE) This section describes basic information about Java and the JRE. Java Java is a recently-developed, concurrent, class-based, object-oriented programming and runtime environment, comprised of: A programming language An API specification A virtual machine specification Java has the following characteristics: Object-oriented. Java provides the basic object technology of C++ with some enhancements and some deletions. 1 Architecture-neutral. Java source code is compiled into architecture-independent object code. The object code is interpreted by a Java Virtual Machine (JVM) on the target architecture. Portable. Java implements additional portability standards. For example, intsare always 32-bit, 2’s-complemented integers. User interfaces are built through an abstract window system that is readily implemented in Solaris and other operating environments.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    58 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us