< Zurück | Inhalt | Weiter >

JavaApplication Development on Linux®


image


JavaApplication Development on Linux®


image


Carl Albing Michael Schwarz


image

Prentice Hall Professional Technical Reference Boston


Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations have been printed with initial capital letters or in all capitals.

The authors and publisher have taken care in the preparation of this book, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein.

The publisher offers excellent discounts on this book when ordered in quantity for bulk purchases or special sales, which may include electronic versions and/or custom covers and content particular to your business, training goals, marketing focus, and branding interests. For more information, please contact:

U. S. Corporate and Government Sales (800) 382-3419 corpsales@pearsontechgroup.com

For sales outside the U. S., please contact:

International Sales international@pearsoned.com

Visit us on the Web: www.phptr.com

Library of Congress Cataloging-in-Publication Data:

CIP data on file.

© 2005 Pearson Education, Inc. ISBN 0–13–143697-X

Text printed in the United States on recycled paper at Pheonix Color in Hagerstown Maryland. First printing, November 2004


To my mother, for her love of words.

—Michael


To my wife, Cynthia.

—Carl


image


Contents


Preface ..........................................................................................................

Introduction ...................................................................................................

xxi xxvii

 


PART I

Getting Started 1

PART II

Developing Business Logic .................................

261

Introduction

Many Paths

Part I

1.3.1 Redirecting I/O

1.3.2 The ls Command

1.3.3 Filenames

1.3.4 Permissions

1.3.5 File Copying

1.3.6 Seeing Stars

1.3.7 File Contents

1.3.8 The grep Command

1.3.9 The find Command

1.3.10 The Shell Revisited

1.3.11 The tar and zip Commands

1.3.12 The man Command

Chapter 2

2.2.1 Exiting

2.2.2 Search and Replace

2.2.3 The Joy of Regular Expressions

2.2.4 Starting Off Right: .exrc

2.3.1 Editing Your Pipes (sed, the Stream EDitor)

2.3.2 Simple Graphical Editors

Chapter 3

3.2.1 Scalar Types

3.2.2 Object Types

3.2.3 Statements

3.2.4 Error Handling, Java Style

3.4.1 Encapsulation

3.4.2 Inheritance

3.4.3 Polymorphism

Chapter 4

4.2.1 Command-Line Arguments

4.2.2 Unit Testing Made Easy

4.3.1 Java and Standard I/O

4.3.2 Environment Variables

4.3.3 Java and Environment Variables

4.5.2 Portability

Chapter 5

5.3.1 Compiler Behavior, Defaults, and Environment Variables

5.3.2 javac Options

5.4.1 The Basics

5.4.2 java Options

5.5.1 Running javadoc

5.5.2 Javadoc Command-Line Options

5.5.3 Javadoc Comments

5.8.1 A Brief Introduction to RMI

5.8.2 The rmic Tool

5.8.3 The rmiregistry Tool

5.8.4 Setting Up Servers and Clients

5.8.5 RMI Summary

5.11.1 Deploying Applications

5.11.2 Basic jar Operation

extcheck

jarsigner

keytool

rmid

serialver

native2ascii

policytool

Chapter 6

6.2.1 Links

6.2.2 Switching Java Versions by Symlink

6.3.1 Performance

6.3.2 Differences in the Commands

6.3.3 IBM Classes

Chapter 7

7.4.1 Compiling FetchURL with gcj

7.4.2 Compiling a Multiclass Program

Chapter 8

repository

sandbox

checkout

commit

update

tag

8.2.1 Setup

8.2.2 Import

8.2.3 Normal Use

8.2.4 Update

8.2.5 Merges

8.2.6 Log

8.2.9 Branching Tags

8.2.11 A Quick Look behind the Scenes

8.3.1 Installing jCVS

Chapter 9

9.3.1 Installing a Binary Tarball

9.3.2 Installing a Source Tarball

9.4.1 XML for the Uninitiated

9.4.2 The Buildfile Tags

9.4.3 A Real, Live Buildfile

Chapter 10

10.2.1 A Brief History of NetBeans1

10.2.2 Installing NetBeans

10.2.3 Getting Around in NetBeans

10.2.4 Integration with CVS

10.2.5 Integration with Ant

10.2.6 Other Add-on Tools

10.4.1 Selecting and Installing Eclipse

10.4.2 Using Eclipse for a New Project

10.4.3 Using Eclipse for an Existing Project

10.4.4 Working with Eclipse

Part II

11.6.1 Monday Morning, 10 A.M.

11.6.2 Back at His Desk

11.7.1 Documenting

11.7.2 Stakeholder Buy-In

11.7.3 Prototyping

Chapter 12

• Do I need this class?

• Should I get functionality by inheritance or composition?

• Does this attribute or method belong here?

Chapter 13

13.4.1 Downloading and Unzipping

13.4.2 Using JUnit

13.5.1 JUnit Assertions

13.5.2 Running a Test Case

Chapter 14 Storing the Data

14.5.1 MySQL

14.5.2 PostgreSQL

14.5.3 Oracle

14.5.4 Selection Criteria

Hibernate4

Castor6

pBeans7

14.9.1 Installing PostgreSQL

14.9.3 Creating Our Database

14.9.4 Straight JDBC

Chapter 15

15.3.1 Downloading JDBC for MySQL

Part III

button

radio button

check box

combo box

menu

label

text field

text area

text pane

list

table

tree

slider

tool tip

progress bar

color chooser

file chooser

panel

split pane

scroll pane

tabbed pane

toolbar

16.7.1 Overview

16.7.2 Creating Pieces

Chapter 17

17.2.1 Another GUI Toolkit. Why?

17.2.2 Duplicated Effort. Why Cover It?

17.2.3 Portability: Better and Worse

17.2.4 The Rest of the Chapter

17.2.5 SWT: Close to the Metal

17.2.6 “Hello, world” SWT Style

17.3.1 Step 1: Convert the Class Members

17.3.2 Step 2: Converting the main() Method

Methods

17.3.4 Completing the Conversion of the BudgetPro Class

17.3.5 Completing the Conversion of the Application

17.3.6 Closing Thoughts

Part IV

18.6.1 Cookies

18.7.1 Prototype

18.7.2 Design

Chapter 19

19.3.1 Scriptlet

19.3.2 Declaration

19.3.3 Expression

19.3.4 Directive

19.3.5 New Syntax

19.3.6 JavaBeans in JSP

19.3.7 Tag Libraries

Chapter 20

20.3.1 Nonroot-Installed Software

1. Create the group.

20.3.2 Finer Grained Control

20.5.1 System V Init System

20.5.2 RedHat/Fedora chkconfig

20.5.3 Other Distributions

20.5.4 IDE Integration

Part V

21.2.1 EJB Concepts

21.2.2 Bean Types

Stateless Session Beans

Stateful Session Beans

21.2.3 Under the Hood

21.3.1 Naming and Directory System Concepts

21.3.2 Common Directory Services

21.3.3 Putting a Face to a Name: JNDI

21.3.4 Using JNDI with JBoss

Chapter 22 Building an EJB

22.2.4 Summarizing the Pieces

22.2.6 Compiling Your Beans

Chapter 23 Deploying EJBs

23.2.1 What’s in an EJB-JAR File

23.2.2 Using Our Bean

23.2.3 Packaging the Servlet

23.3.1 JBoss

23.3.2 Geronimo

23.4.1 Ant and CVS

23.4.2 XDoclet

Chapter 24 Parting Shots

Appendix A ASCII Chart

Appendix B

Appendix C

Index

Symbols

Numbers

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z