Wednesday, October 22, 2014

Beginning Java 8 APIs, Extensions and Libraries: Swing, JavaFX, JavaScript, JDBC and Network Programming APIs

Beginning Java 8 APIs, Extensions and Libraries: Swing, JavaFX, JavaScript, JDBC and Network Programming APIs completes the Apress learning Java journey and is a comprehensive approach to learning the Java programming language extensions and available APIs and libraries, including the new JavaFX APIs.

This book covers the key extensions of the Java programming language such as Swing, JavaFX, network programming, and JDBC. Each topic starts with a discussion of the topic's background. A step-by-step process, with small snippets of Java code, provides easy-to-follow instructions. At the end of a topic, a complete and ready-to-run Java program is provided. This book contains over 130 images and diagrams to help you visualize and better understand the topics. More than 130 complete programs allow you to practice and quickly learn the topics.

The Swing chapters discuss various aspects of working with a GUI, from the very basic concepts of developing a Swing application, to the most advanced topics, such as decorating a Swing component with a JLayer, drag-and-drop features, Synth Skinnable L&F, etc.

The chapter on network programming covers the basics of network technologies first, and then, the advanced topics of network programming, using a Java class library. It covers IPv4 and IPv6, addressing schemes, subnetting, supernetting, multicasting, TCP/IP sockets, UPD sockets, asynchronous socket I/O, etc.

The chapter on JDBC provides the details of connecting and working with databases such as Oracle, SQL Server, MySQL, DB2, Java DB (Apache Derby), Sybase, Adaptive Server Anywhere, etc. It contains a complete discussion on processing a ResultSet and a RowSet. It discusses how to use the RowSetFactory, to obtain a RowSet object of a specific type. Working with Large Objects (LOBs), such as Blob, Clob, and NClob, is covered in detail with Java code examples and database scripts.

What you’ll learn
  • How to extend your Java skills beyond the fundamental object oriented concepts and core language features
  • How to apply Java Swing for building Java front ends or user interfaces (UIs)
  • How to build small Java applications called applets
  • How to do Java network programming
  • How to connect with databases using JDBC APIs
  • How to work with JavaFX, RMI (Remote Method Invocation), and JNI (Java Native Interface)
  • How to use scripting in Java, including coverage of the Nashorn engine
Who this book is for
This tutorial is for Java programmers who are familiar with the fundamentals of the Java language and Java programming, who are now ready to call upon the power of extended Java functionality available from the huge array of Java APIs, extensions and libraries.

Table of Contents
1. Introduction to Swing
2. Swing Components
3. Advanced Swing
4. Applets
5. Network Programming
6. JDBC APIs
7. Java Remote Method Invocation
8. Java Native Interface
9. Introduction to JavaFX
10. Scripting in Java

Friday, October 17, 2014

Get various parts from URL

package javaurlget;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;

public class JavaURLget {

    public static void main(String[] args) {
        String src = "http://java-buddy.blogspot.com/search/label/java8";
        try {
            URL srcURL = new URL(src);
            
            System.out.println(srcURL.toString());
            System.out.println("Host: " + srcURL.getHost());
            System.out.println("Path: " + srcURL.getPath());
            System.out.println("Port: " + srcURL.getPort());
            System.out.println("Protocol: " + srcURL.getProtocol());
            System.out.println("Authority: " + srcURL.getAuthority());
            System.out.println("File: " + srcURL.getFile());
            
        } catch (MalformedURLException ex) {
            Logger.getLogger(JavaURLget.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
    
}



Java 8 Recipes, 2nd Edition

Java 8 Recipes offers solutions to common programming problems encountered while developing Java-based applications. Fully updated with the newest features and techniques available, Java 8 Recipes provides code examples involving Lambdas, embedded scripting with Nashorn, the new date-time API, stream support, functional interfaces, and much more. Especial emphasis is given to features such as lambdas that are newly introduced in Java 8. Content is presented in the popular problem-solution format: Look up the programming problem that you want to solve. Read the solution. Apply the solution directly in your own code. Problem solved!

The problem-solution approach sets Java 8 Recipes apart. Java 8 Recipes is focused less on the language itself and more on what you can do with it that is useful. The book respects your time by always focusing on a task that you might want to perform using the language. Solutions come first. Explanations come later. You are free to crib from the book and apply the code examples directly to your own projects.
  • Covers the newly-released Java 8, including a brand new chapter on lambdas
  • Focuses especially on up-and-coming technologies such as Project Nashorn and Java FX 2.0
  • Respects your time by focusing on practical solutions you can implement in your own code
What you’ll learn
  • Develop Java SE applications using the latest in Java SE technology
  • Exploit the newly-introduced lambda features in Java 8
  • Build dynamic web applications with JavaScript and Project Nashorn
  • Create great-looking user interfaces with Java FX 2.0
  • Generate graphics and work with media such as sound and video
  • Add internationalization support to your Java applications
Who this book is for
Java 8 Recipes is aimed mainly at intermediate and experienced Java programmers. If you're past the point of being able to write "Hello, World", then you'll find Java 8 Recipes to be chock full of interesting and useful programming solutions to help you achieve your goals and meet with success in your Java programming projects.

Table of Contents
Chapter 1: Language Basics
Chapter 2: Java 8 JDK Enhancements
Chapter 3: Strings
Chapter 4: Numbers and Dates
Chapter 5: Object-Oriented Java
Chapter 6: Lambda Expressions
Chapter 7: Data Structures, Conditionals, and Collections
Chapter 8: Input and Output
Chapter 9: Exceptions and Logging
Chapter 10: Concurrency
Chapter 11: Debugging and Unit Testing
Chapter 12: Unicode, Internationalization, and Currency Codes
Chapter 13: Working with Databases
Chapter 14: JavaFX Fundamentals
Chapter 15: Graphics with JavaFX
Chapter 16: Media with JavaFX
Chapter 17: JavaFX on the Web
Chapter 18: Nashorn and Scripting
Chapter 19: Email
Chapter 20: XML Processing
Chapter 21: Networking
Chapter 22: Java 8 Security Enhancements

Thursday, October 16, 2014

Mastering JavaFX 8 Controls

Design and Deploy High-Performance JavaFX Controls: Mastering JavaFX 8 Controls (Oracle (McGraw-Hill))

Deliver state-of-the-art applications with visually stunning UIs. Mastering JavaFX 8 Controls provides clear instructions, detailed examples, and ready-to-use code samples. Find out how to work with the latest JavaFX APIs, configure UI components, automatically generate FXML, build cutting-edge controls, and effectively apply CSS styling. Troubleshooting, tuning, and deployment are also covered in this Oracle Press guide.
  • Understand the properties of JavaFX 8 controls and APIs
  • Create custom controls, transformations, and layouts
  • Work from JavaFX Scene Graph and Scene Builder
  • Visualize data models using advanced control types
  • Use ListView, TableView, and TreeView APIs
  • Handle audio and video content using JavaFX media classes
  • Maximize separation between UI and application logic using FXML
  • Style controls and applications using CSS
  • Extend functionality of Swing and SWT applications with JavaFX
Code examples in the book are available for download.

Mastering Lambdas: Java Programming in a Multicore World

The Definitive Guide to Lambda Expressions: Mastering Lambdas: Java Programming in a Multicore World

Mastering Lambdas: Java Programming in a Multicore World describes how the lambda-related features of Java SE 8 will enable Java to meet the challenges of next-generation parallel hardware architectures. The book explains how to write lambdas, and how to use them in streams and in collection processing, providing code examples throughout. You'll learn how to use lambda expressions to take full advantage of performance improvements provided by today's multicore hardware. This Oracle Press book covers:
  • Why lambdas were needed, and how they will change Java programming
  • Syntax of lambda expressions
  • The basic operation of streams and pipelines
  • Using collectors and reduction to end pipelines
  • Creating streams
  • Spliterators, the fork/join framework, and exceptions
  • Examining stream performance with microbenchmarking
  • API evolution using default methods

Monday, October 13, 2014

Java EE 7: The Big Picture

The Definitive Guide to Java Platform, Enterprise Edition 7

Java EE 7: The Big Picture uniquely explores the entire Java EE 7 platform in an all-encompassing style while examining each tier of the platform in enough detail so that you can select the right technologies for specific project needs. In this authoritative guide, Java expert Danny Coward walks you through the code, applications, and frameworks that power the platform. Take full advantage of the robust capabilities of Java EE 7, increase your productivity, and meet enterprise demands with help from this Oracle Press resource.
  • Explore the features of the Java servlet model and Java servlet API
  • Create dynamic web content with JavaServer Pages and JavaServer Faces
  • Build websites for nonbrowser clients with JAX-RS
  • Push data to web clients using Java WebSockets
  • Secure web applications
  • Work with web component APIs
  • Maximize enterprise beans for multithreading, asynchronous processes, transactions, and more
  • Access relational databases with the Java Database Connectivity APIs and the Java Persistence API
  • Understand the packaging and deployment mechanisms of Java EE applications
  • Work with Java EE Contexts and Dependency Injection
  • Secure enterprise beans in a Java EE application
  • Enable parallel processing with Java EE concurrency APIs

Friday, October 10, 2014

IoT Dev Challenge Student Winners: ePot

JavaOne interview with the student winners of the OTN IoT Developer Challenge.