Category: Java

The Java Tutorials Bundle

Author Raymond Gallardo, Scott Hommel, Sowmya Kannan, Joni Gordon, Sharon Biocca Zakhour
Format archived HTML
Price free

The Java Tutorial, Sixth Edition, is based on Java Platform, Standard Edition (Java SE) 8. This revised and updated edition introduces the new features added to the platform, including lambda expressions, default methods, aggregate operations, and more. An accessible and practical guide for programmers of any level, this book focuses on how to use the rich environment provided by Java to build applications, applets, and components.

Expanded coverage includes a chapter on the Date-Time API and a new chapter on annotations, with sections on type annotations and pluggable type systems as well as repeating annotations.

In addition, the updated sections “Security in Rich Internet Applications” and “Guidelines for Securing Rich Internet Applications” address key security topics. The latest deployment best practices are described in the chapter “Deployment in Depth.”

If you plan to take one of the Java SE 8 certification exams, this book can help. A special appendix, “Preparing for Java Programming Language Certification,” details the items covered on the available exams. Check online for updates.

Continue reading

Java Look and Feel Design Guidelines

Java Look and Feel Design Guidelines

Author Sun Microsystems, Inc.
Format online HTML
Price free

Java Look and Feel Design Guidelines, second edition, provides essential information for anyone involved in creating cross-platform GUI (graphical user interface) applications and applets in the JavaTM programming language. In particular, this book offers design guidelines for software that uses the Swing classes together with the Java look and feel.

This revised and expanded edition contains a collection of toolbar graphics, lists of terms localized for European and Asian languages, and an appendix on look and feel switching. New and revised guidelines are provided throughout, and new sections discuss smooth interaction, the use of badges in button graphics, and revised standards for window titles.

Although an application’s human interface designer and software developer might well be the same person, the two jobs involve different tasks and require different skills and tools. Primarily, this book addresses the designer who chooses the interface elements, lays them out in a set of components, and designs the user interaction model for an application. (Unless specified otherwise, this book uses “application” to refer to both applets and applications.) This book should also prove useful for developers, technical writers, graphic artists, production and marketing specialists, and testers who participate in the creation of Java applications and applets.

Java Look and Feel Design Guidelines focuses on design issues and human-computer interaction in the context of the Java look and feel. It also attempts to provide a common vocabulary for designers, developers, and other professionals.

The guidelines provided in this book are appropriate for GUI applications and applets that run on personal computers and network computers. They do not address the needs of software that runs on consumer electronic devices.

Continue reading

Bleeding at the Keyboard: A Guide to Modern Programming with Java

Bleeding at the Keyboard

Bleeding at the Keyboard

Author Gregory J. E. Rawlins
Format online HTML
Price free

Creating a Java program is a bit like making a movie or putting on a play. Every theatrical production needs actors (in Java these are objects), roles the actors play (classes), and scenes the actors play out (methods). In a movie or play, actors step into one of their scenes when given a cue; in a Java program, objects enter one of their methods when cued to do so by another object. The Java interpreter, which runs each Java program, is like a combination stage manager and producer—it creates the set, casts the actors, and teaches them their roles. We, as Java programmers, are like playwrights (or screenwriters) and directors put together, we specify the roles the actors will play. Our program’s users are the audience.

Just as a stage manager and a producer read a play or movie script to find out what sets to create and what kinds of actors to audition, the Java interpreter reads each of the classes that we as programmers write to find out how objects of that class must behave (their role). Unlike temperamental actors, however, each Java object does exactly as its class tells it, so each object is the personification of a single role.

Real actors can play many roles; Java objects are all role. A play’s script usually specifies the actions of many characters in lots of different roles: butlers, tycoons, girl scouts, lone gunmen. A Java class, however, only specifies the actions of one quite specific type of character; that is, one role. So a simple Java program might be the equivalent of an extremely boring play about a butler forever polishing silverware, or a snoozer about a tennis pro playing exactly one round of a game of tennis. A complex program, however, might describe a universe of thousands of roles for its objects to play, all working together to run a sophisticated game, a nuclear power station, a national telephone service, or an orbital telescope.

Continue reading

Blackfish SQL Developers Guide

  • Author: Steven T. Shaughnessy, Jens Ole Lauridsen
  • Format: archived PDF
  • Price: free

Blackfish SQL is a high-performance, small-footprint, transactional database that  was originally implemented as an all-Java database called JDataStore. This is now called Blackfish SQL for Java.
Blackfish SQL was then ported from Java to C#. The C# implementation is called Blackfish SQL for Windows.

This book is intended for developers implementing Blackfish SQL database applications and system administrators responsible for installing, deploying, and maintaining Blackfish SQL databases.

A CodeGear Developer Network membership is needed in order to download the .zip file. Registration is free.

Chapters include:

  • Overview
  • System Architecture
  • Establishing Connections
  • Administering Blackfish SQL
  • Using Blackfish SQL Security
  • Using Stored Procedures and User Defined Functions
  • Using Triggers in Blackfish SQL Tables
  • Stored Procedures Reference
  • SQL Reference
  • Optimizing Blackfish SQL Applications
  • Deploying Blackfish SQL Database Applications
  • Troubleshooting

Java Application Development on Linux

My image
  • Author: Carl Albing, Michael Schwarz
  • Format: PDF
  • Price: free

Linux is the fastest-growing Java development platform because it saves money and time by serving as a platform for both development and deployment. But developers face significant platform-specific challenges when managing and deploying Java applications in a controlled production environment.
Written for Java and Linux developers alike, Java Application Development on Linux is the hands-on guide to the full Java application development lifecycle on Linux.

Determined to spare other developers hours of trial and error, Albing and Schwarz demonstrate the platform, tools, and application development by showing realistic, easy-to-follow examples. After a simple command-line application introduces basic tools, this program leads readers through business-logic object analysis, database design, Java servlet UIs, Java Server Pages (JSP) UIs, Swing GUIs, and Standard Widget Toolkit (SWT) GUIs. Scaling up to the enterprise level provides the opportunity to use both the JBoss Application Server and the Apache Geronimo Application Servers, and Enterprise JavaBeans (EJB).

The authors conclude by demonstrating how a hierarchy of budgets can be created, tracked, and shared with Concurrent Versions System (CVS).

A companion Website includes all source code and a link to each tool described.

Java Application Development on Linux can propel you from a standing start to the full-speed development and deployment of Java applications on Linux.

Chapters include:

  • An Embarrassment of Riches: The Linux Environment
  • An Embarrassment of Riches: Editors
  • An Experienced Programmer’s Introduction to Java
  • Where Am I? Execution Context
  • The Sun Microsystems Java Software Development Kit
  • The IBM Developer Kit for Linux, Java 2 Technology Edition
  • The GNU Compiler for Java (gcj)
  • Know What You Have: CVS
  • Ant: An Introduction
  • Integrated Development Environments
  • Balancing Acts: An Imaginary Scenario
  • Analysis and Design: Seeking the Objects
  • JUnit: Automating Unit Testing
  • Storing the Data
  • Accessing the Data: An Introduction to JDBC
  • Getting in the Swing of Things: Designing a GUI for BudgetPro
  • Other Ways: Alternatives to Swing
  • Servlets: Java Pressed into Service
  • JSP: Servlets Turned Inside Out
  • Open Source Web Application Servers
  • Introduction to Enterprise JavaBeans
  • Building an EJB
  • Deploying EJBs
  • Parting Shots

Apache Jakarta Commons: Reusable Java Components

My image
  • Author: Will Iverson
  • Format: PDF
  • Price: free

Using the Apache Jakarta Commons reusable Java components, you can leverage the work of the global open-source community to solve common programming problems reliably, quickly, and inexpensively.

But, to use the Commons libraries effectively, you need far more guidance than the official documentation offers. In Apache Jakarta Commons: Reusable Java Components, Will Iverson covers what Java developers need to know to take full advantage of Jakarta Commons—starting right now.

Iverson begins with a definitive overview of the Commons project: goals, installation, and getting started with Commons components. Next, he presents example-rich chapters on the twelve most useful Commons packages, covering topics ranging from HTTP FileUpload to database connectivity. Iverson provides detailed code samples for every component he describes. After you’ve mastered the core Jakarta Commons packages, you’ll constantly rely on this book’s handy seventy-five page quick-reference.

Whether you’re building code for front-end Web applications, client-side software, or back-end servers, learning Jakarta Commons will make you far more efficient. Apache Jakarta Commons is the fastest way to master and get results with Commons.

Chapters include:

  • Overview
  • FileUpload
  • HttpClient
  • Net
  • Pool
  • DBCP (Database Connection Pool)
  • BeanUtils
  • JXPath
  • Logging
  • Lang
  • Collections
  • Codec
  • CLI (Command-Line Interface)
  • Other Projects
  • Lang Reference
Download source code examples

J2ME & Gaming

My image
  • Author: Jason Lam
  • Format: PDF download, with source
  • Price: free

This book is about programming with J2ME on wireless devices with focus on developing games. It is assumed you have some knowledge and programming experience with J2ME and J2SE.

The book does not go into detail on topics like how to make high level GUI menu but does demonstrate what a game menu might look like. Nor will it explain in detail how to use the Record Management System (RMS), but will go over topics that use RMS such as high score and game settings. As well a knowledge and experience with threading will be an asset before proceeding with game development. The book will go over in detail the new game classes that are now included in the MIDP 2.0.

The book also serves as quick reference for Java programmers who are interested in mobile game development. As well, to provide good introduction for experience game developers who developed games in other languages/platforms and are now interested in using J2ME to develop games.

It is a work in progress and not quite complete as of the time of this posting.

Chapters include:

  • Overview
  • Mobile Game Contraints
  • Before Code
  • MIDP2 Game Classes
  • Math Constraints
  • Eliminator: Introduction
  • Eliminator: Splash Screen
  • Eliminator: Game Menu
  • Eliminator: Exception Handling
  • Eliminator: Settings & High Score
  • Eliminator: Terrain (Scrolling …)
  • Eliminator: Player and Bullets
  • Eliminator: Change of Scenery
  • Eliminator: Enemies & Game Items
  • Eliminator: Boss
  • Eliminator: Game Extras
  • Improving
  • Adding Time Trial to Your Game
  • Customer Interface
  • (more chapters to come)

Java Platform Performance: Strategies and Tactics

  • Author: Wilson, Kesselman
  • Format: HTML
  • Price: free

Direct from Sun’s Java Performance Team, Java Platform Performance is a comprehensive field manual full of battle-tested strategies and tactics for developing high-performance applications and applets with Java technology.

This book covers every aspect of Java performance, including speed, scalability, RAM footprint, startup time, and user-perceived performance factors. Part I covers the crucial process issues associated with Java optimization, outlining how performance tuning fits into the software development process, showing how to use benchmarks and profiling tools to identify hot spots and bottlenecks, and presenting general strategies for enhancing the performance of Java technology-based systems.

In Part II, the authors present a wide array of concrete optimization techniques, including: enhancing the speed and scalability of Swing GUIs; providing high-speed I/O and using serialization; controlling RAM footprint and class loading; selecting optimal algorithms and data structures; using native code; and more.

The book contains detailed appendices on garbage collection and the Java HotSpot Virtual Machine, written to address key performance questions. For all intermediate-to-advanced Java software developers, engineers, engineering managers, and technical leads.

Continue reading

The Java Tutorial

My image
  • Author: Campione, Walrath, Huml, The Tutorial Team
  • Format: HTML (with archived example bundles)
  • Price: free

Follow your own path to expertise with this self-guided tour of the Java programming language. Written by two members of the JavaSoft team at Sun Microsystems, the book employs a hands-on interactive approach to teaching Java basics, object-oriented concepts, applet programming, and everything else you need to know to become a proficient Java programmer.

Through a task-oriented, example-driven approach, The Java Tutorial introduces you to fundamental concepts and applications. Designed so that you can customize your own path through the specific information you need, the book explains the nuts and bolts of the language, applet construction, and the fundamental Java classes. You will also learn about more advanced topics such as creating a graphical user interface (GUI), using multiple threads, and working with Java’s networking capabilities.

Chapters include:

  • Getting Started
  • Learning the Java Language
  • Essential Java Classes
  • Writing Applets
  • Creating a GUI with JFC/Swing
  • Collections
  • Internationalization
  • 2D Graphics
  • Sound
  • JavaBeans
  • JDBC Database Access
  • RMI
  • IDL
  • Security in Java 2 SDK 1.2
  • JAR Files
  • The Extension Mechanism
  • Java Native Interface
  • The Reflection API
  • Putting It All Together
  • Custom Networking
  • JDK 1.1 — And Beyond!
  • Bonus
  • Drag and Drop
  • Security in JDK 1.1

View at
Download example bundles at

Case Studies: J2EE Technology in Practice

My image
  • Author: Cattell, Inscore, Enterprise Partners
  • Format: HTML
  • Price: free

Since its introduction in 1999, the Java 2 Platform, Enterprise Edition (J2EE) has achieved remarkable success. Over one million developers have downloaded the J2EE SDK and over a dozen application server companies have announced J2EE compatible products.

J2EE Technology in Practice describes how the J2EE platform has helped leading corporations, educational institutions, and government organizations meet the challenges of developing distributed applications.

Following the tradition of the Java Community Process, J2EE in Practice represents the ongoing partnership between the Java software group, J2EE licensees, and their customers. Each case study shows how the J2EE platform was used to solve an existing business problem.

J2EE Technology in Practice includes the following case studies:

  • J.Crew Builds Out to the Web with the ATG Dynamo Suite
  • AT&T Unisource: Cost-Optimized Routing Environment (CORE) on the Borland Application Server
  • Codexa: Building a Big Bang Architecture with J2EE on Brokat’s GemStone Server
  • Java Engine Powers New ASP for Charities with Forte Tools
  • HP Bluestone’s Total-e-Server at Altura International: Deploying J2EE for Performance and Scalability
  • IBM Helps Honeywell Manage Manufacturing and Engineering Processes
  • Bekins Handles Large Package Delivery with IBM and J2EE Technology
  • International Data Post Brings Snail Mail to the Internet Age with iPlanet
  • CERN Simplifies Document Handling Using the Oracle Application Server
  • U.S. Army Military Traffic Management Command, Freight Systems Division

View at

Designing Enterprise Applications with J2EE, Second Edition

My image
  • Author: Singh, Stearns, Johnson, Enterprise Team
  • Format: HTML
  • Price: free

As part of the highly regarded Java BluePrints program, Designing Enterprise Applications with the J2EE Platform, Second Edition, describes the key architectural and design issues in applications supported by the J2EE platform and offers practical guidelines for both architects and developers. It explores key J2EE platform features such as Java servlets, JavaServer Pages, and Enterprise JavaBeans component models, as well as the JDBC API, Java Message Service API, and J2EE Connector Architecture. It also discusses security, deployment, transaction management, internationalization, and other important issues for today’s applications.

Through code samples and a full e-commerce application example, this book provides concrete guidelines to mastering the J2EE platform.

Chapters include:

  • Introduction
  • J2EE Platform Technologies
  • The Client Tier
  • The Web Tier
  • The Enterprise JavaBeans Tier
  • Integrating with the Enterprise Information Systems Tier
  • Packaging and Deployment
  • Transaction Management
  • Security
  • J2EE Internationalization and Localization
  • Architecture of the Sample Application

View at

The J2EE Tutorial, Second Edition

  • Author: Singh, Stearns, Johnson, Enterprise Team
  • Format: HTML
  • Price: free

The J2EE Tutorial, Second Edition, is the complete guide to all major components of the Java 2 Platform, Enterprise Edition (J2EE) version 1.4. Written by members of the J2EE platform team at Sun Microsystems, this is the task-oriented and example-driven book that will have new and intermediate Java programmers building J2EE applications right away.

The first chapters introduce the J2EE 1.4 platform architecture and APIs, the Sun Java System Application Server Platform Edition 8, and the basics of working with XML and Web applications. The greater part of the book is devoted to describing and demonstrating the Java XML, Web-tier, and Enterprise JavaBeans technologies and platform services. Extensive examples and case studies show you how to put these technologies to work in the real world.

Chapters include:

  • Overview
  • Understanding XML
  • Getting Started with Web Applications
  • Java API for XML Processing
  • Simple API for XML
  • Document Object Model
  • Extensible Stylesheet Language Transformations
  • Building Web Services with JAX-RPC
  • SOAP with Attachments API for Java
  • Java API for XML Registries
  • Java Servlet Technology
  • JavaServer Pages Technology
  • JavaServer Pages Documents
  • JavaServer Pages Standard Tag Library
  • Custom Tags in JSP Pages
  • Scripting in JSP Pages
  • JavaServer Faces Technology
  • Using JavaServer Faces Technology in JSP Pages
  • Developing with JavaServer Faces Technology
  • Creating Custom UI Components
  • Configuring JavaServer Faces Applications
  • Internationalizing and Localizing Web Applications
  • Enterprise Beans
  • Getting Started with Enterprise Beans
  • Session Bean Examples
  • Bean-Managed Persistence Examples
  • Container-Managed Persistence Examples
  • A Message-Driven Bean Example
  • Enterprise JavaBeans Query Language
  • Transactions
  • Resource Connections
  • Security
  • The Java Message Service API
  • J2EE Examples Using the JMS API
  • The Coffee Break Application
  • The Duke’s Bank Application

View at

Creating a GUI with JFC/Swing

  • Author: Walrath, Campione, Huml, Zakhour
  • Format: HTML
  • Price: free

This book tells you how to create graphical user interfaces (GUIs) for applications and applets, using the Swing components.

Chapters include:

  • Getting Started with Swing
  • Learning Swing by Example
  • Using Swing Components
  • Using Other Swing Features
  • Laying Out Components Within a Container
  • Writing Event Listeners
  • Performing Custom Painting

View at

Designing Web Services with the J2EE 1.4 Platform: JAX-RPC, SOAP, and XML Technologies

  • Author: Singh, Brydon, Murray, Ramachandran, Violleau, Stearns
  • Format: HTML
  • Price: free

This book describes designing Web services using the current technologies available with the Java 2 Platform, Enterprise Edition. This book and the accompanying Java Adventure Builder Reference application (hereafter referred to as adventure builder) are part of the successful Java BluePrints program created by Sun Microsystems with the introduction of the J2EE platform. Application architects, developers, and students everywhere have used this program to better understand the programming model inherent in the J2EE platform.

Rather than providing information on how to use individual Java technologies to write applications, which falls within the realm of the companion Java Tutorial program, the Java BluePrints focuses on guidelines for application architecture and design, such as distributing J2EE application functionality across tiers and choosing among design options for Web services endpoints. This book describes the Web services and related technologies of the J2EE platform. Its focus is how to best apply these J2EE platform technologies to writing Web service applications. This book assumes that you have a basic knowledge of the J2EE platform, which you can get from The J2EE Tutorial, and is meant to be read in conjunction with Designing Enterprise Applications with the J2EE Platform, Second Edition, since that book covers the J2EE platform technologies for writing traditional enterprise applications.

This book is intended primarily for enterprise architects and application developers engaged in or considering writing Web services and Web service applications with the J2EE platform. It is also useful for product vendors interested in developing Web service applications consistent with the J2EE platform standard.

Chapters include:

  • Introduction
  • Standards and Technologies
  • Service Endpoint Design
  • XML Processing
  • Client Design
  • Enterprise Application Integration
  • Security
  • Application Architecture and Design

View at

Practical Artificial Intelligence Programming in Java

  • Author: Mark Watson
  • Format: archived PDF and example code
  • Price: free

This Open Content book covers AI programming techniques using Java.
The latest version has a completed new chapter on statistical natural language processing and a new section on embedded expert systems, and a new chapter on spam detection.
This is not the original book written for Morgan Kaufman Publishers. This book contains all new material.
Chapters include:

  • Search – graph search, and alpha-beta search in tic-tac-toe and chess
  • Natural Language Processing – a simple ATN parser that uses a huge lexicon derived from Wordnet data, material NLBean project, and an embedded Prolog parser (includes Sieuwert van Otterloo’s fine Prolog implementation in Java).
  • Expert systems – two simple examples using the Jess system
  • Genetic algorithms – Java utility classes and two examples
  • Neural Networks – utility classes for Hopfield and back propagation. Only includes simple examples to show how to use the utility classes.
  • Statistical Natural Language Processing (Markov Models)
  • SPAM Email detection

Download book here