Tuesday Sep 01, 2015

Java 8 Date & Time

Want to learn the intricacies of the new Java 8 Date and Time API? Learn how to simplify your programming of date and time and use Java 8 Date and Time API. In the next VTS, Simon Ritter discusses how the previous APIs treated the date and time and explains the much need improvements of the new API. For example, the classes java.util.Date and SimpleDateFormatter were not thread-safe.

Java 8 introduced the JSR 310, Date and Time API, which is based on the very popular open source Joda time API. The new Java library handles the format and schedule of time and date in a much more intuitive and flexible way. Simon explains in detail how to use the new API with different formats for setting future dates, dealing with time zones, adding temporal adjustors and much more.  

VTS is a series of interactive online events with hands-on sessions and presenters answering technical questions. The events are sponsored by the Oracle Technology Network (OTN). They are free events but you must register. Join the next exclusive events near you: 

  • Americas - September 16th- 9:30am to 12:30 PST - Register 
  • EMEA - September 23rd - 9:30am to 12:30pm BST - Register
  • APAC - September 30th- 3pm to 6:30pm AU/SYD - Register

Thursday Aug 27, 2015

Just-in-Time Compilation with JITWatch

Want to optimize the performance of your code? Ben Evans and Chris Newland wrap up their three-part series about using JITWatch to understand the just-in-time (JIT) compilation techniques used by the dynamic compiler in Oracle’s Java HotSpot VM. JITWatch is a free, open source tool developed by Newland that analyzes the complex compilation log file output generated by Java HotSpot VM. Among other things, it can help you visualize and understand the optimization decisions made by Java HotSpot VM.

Part 3 describes how to use JITWatch to see the effects that even small source code changes can have on Java HotSpot VM switches. Learn about Sandbox and VM switches features. Sandbox will let you edit code and then compile, execute, and analyze the Java HotSpot VM JIT logs. The VM switches are used to control JIT compilation.

In the September/October edition of Java Magazine Ben and Chris wrote part 2, which focuses on how to examine JIT logs to see what the JIT compiler is doing (and why). Part 1 provides a primer on JIT compilation.

Wednesday Aug 26, 2015

New Java Champion Vinicius Senger

Welcome to the new Java Champion: Vinicius Senger 

Vinicius Senger is the founder of Globalcode, a company teaching programming to trainers and professionals.

He has 20 years of experience in programming. His first Java app ran in HPUX capturing SNMP data from the network and storing in Sybase. He did a number of projects with J2EE for financial services and banks using web components, EJB, JMS and many different types of architectures using JSF, Seam, Spring, etc.

In addition, he wrote programs on embedded devices and created the 2011 Duke's Choice Award project called jHome Automation that uses Java EE to provide home automation using different devices and communication protocols. He is dedicated to developing Java Embedded and Java EE projects. Last year, he implemented Java Embedded for a sailboat for JavaOne 2014. He just launched Combike project, which is a Smart Helmet for bikers using camera, GPS, accelerometer and a social network behind.

He is a frequent speaker at many Java conferences around the world including Devoxx, JFokus, and The Developer Conference in Brazil that he co-organizes. He has been a JavaOne rockstar speaker for several years.

He is a regular contributor to the Java Magazine and wrote an article about device I/O for the November 2014 issue. He also authored an IoT video series in English and Portuguese on YouTube.com/java 

Java champions are an exclusive group of passionate Java technologists and community leaders who are community-nominated. Learn more about Java Champions.   

Tuesday Aug 25, 2015

JavaOne Track Highlights: Java and Server-Side Development

By David Lopez

The JavaOne 2015 Content Catalog is live. We’ve got hundreds of great sessions covering all things Java related. To help you find exactly what you’re looking for, be it Server-Side Development, Security, or anything in between, the sessions have been placed into tracks. There are 8 tracks at this year’s conference designed to be the ultimate guide to help you stay on top of the latest innovations in Java technologies. This is the sixth post in a series on the tracks being offered at this year’s conference. Last week, we looked at the Java and the Internet of Things track. Today, let’s look at the Java and Server-Side Development track and a few featured sessions. 

This track focuses on the Java Platform, Enterprise Edition (Java EE). Looking to get the most out of Java EE 7 and look forward to 8? You’ve come to the right place. Sessions on this track will keep you moving along with the best new methods and updates for staying on top of security, persistence, CDI, transactions, Java Message Service 2.0, Concurrency Utilities, and batch APIs. Java EE experts will also teach you how to develop secure and scalable services with technologies like WebSockets, JSON, and JAX-RS 2.0. 

As far as featured sessions go, this track has 3 great Hands-On Labs to look out for. These sessions are unique because of their hands-on nature, meaning that you’ll walk away with some new tools in your belt. For example, Yuriy Artamonov poses a challenge in his session “Develop a Fully Functioned Business Application in Hours with CUBA Platform.” Can you build a genuine enterprise application with commercial value in just 2 hours? He’ll show you how in this session. You’ll utilize the CUBA Platform to create an application complete with a UI, business logic, security and audit, reports, and a REST API for a bicycle workshop. 

To get even more hands-on Java EE knowledge, check out “Building Applications with PostgreSQL’s jsonb Datatype, Play 2 Framework, and REST.” Developing a web application with PostgreSQL’s jsonb datatype and the REST API means that you can store all data in a single database, easily make data changes, simplify the way you manage difficult class hierarchies, save data in one table in JSON and relational view, and decrease your development time while speeding up web application performance, and Anton Kazakov from Softarex Technologies Inc. will show you how in this session. The third featured session was covered in last week’s IoT Track Highlights. It’s called “Highly Loaded Server-Side Multitask Management Systems Based on Java and Redis.” It’s a great session for those of you interested in server-side development, the IoT, or both. You’ll walk away with the knowledge of how to develop an IoT system utilizing server-based solutions. Check it out here

To see more from this track, head over to the Content Catalog and filter by Java and Server-Side Development. Let’s not forget that this great technology is only possible because of contributions from the rich community that surrounds Java EE. What better place to get to know this community and to meet the some of the biggest innovators face-to-face than JavaOne? The Early Bird Discount is in its final days, so register soon, and don’t miss this year’s JavaOne!

Thursday Aug 20, 2015

DevOps, Docker, Chef…

What problems does DevOps solve, how is it used, and what are some of the tools? This new issue of the Java Magazine focuses on all things DevOps. 'DevOps has given developers more insight into how their code runs and helped admins become less risk-averse’  explains Patrick Debois, who created DevOps. Consider the example of Netflix, which reaped the benefits of using DevOps. Combine the implementation of Docker, Puppet and Vagrant to create a successful continuous delivery (CD).  

 The articles in this new issue of Java Magazine are: 
- How Dev Vs Ops became DevOps, an interview with Patrick Debois 
- Continuous Delivery of Microservices at Netflix 
- Building and Managing Lightweight Containers with Docker, Puppet and Vagrant 
- Putting the continuous in Continous Delivery with Chef 
- Functional Programming in Java: Using Collections 
- Contexts and Dependency Injection: the New Java EE Toolbox  
- Inside the CPU: the Unexpected Effects of Instruction Execution

Register for the magazine. It is free!

Wednesday Aug 19, 2015

From Technical Debt to Software Development Analytics

You’ve surely heard the term ‘technical debt’ and the many ways it has been defined, but do you know when and how it is appropriate to apply technical debt as an analytical technique? In this article, Israel Gat gives a refresher on the three of the technical debt metaphors and how you should use those metaphors.

He makes the case that technical debt can be viewed as three types of analytics. Technical Debt as a Form of:

  • Descriptive Analytics
  • Predictive Analytics
  • Prescriptive Analytics 

He also discusses when it is advantageous to apply technical debt analysis depending on the type of software project you are working on. He presents 3 kinds of projects and their  corresponding kinds of analytics. Read the full article

Tuesday Aug 18, 2015

Java 8 Update 60 Release

This latest Java 8 release includes Nashorn enhancements, and improvements to Deployment Rule Set functionality.  It also has ARM support and the Java Development Kit for ARM is part of the release 8u60 (JDK 8u60 for ARM). A substantial number of bug fixes are available in this release. Make sure to check the release notes for details. The download is available here

Quick note on another release, which is part of the Java SE Advanced and Suite. The release is Java Advanced Management Console (AMC) 2.0, a Java application usage tracking tool. New to this release is the auto detecting windows agent that assists with auto configuration of details across a wide user base. The release note is available here.   

Lizard Selfies with Raspberry Pi and Java EE

By guest blogger Roberto Marquez 

I wrote a Java EE app to manage the enclosure lighting for Chinese water dragons.  It uses servlets and cron to control relays attached to the Raspberry Pi GPIO pins.

Recently, I revisited the project to make use of the Raspberry Pi camera for lizard selfies.  The application listens for changes on GPIO pin connected to a momentary capacitive touch sensor.  When the selfie sensor pin goes high, a  photo is taken. Watch his demo series on YouTube. 

You can find the capacitive touch sensor on Adafruit. I did not find a Raspberry Pi camera cable in Fritzing, but a standard ribbon cable was used.  Here is a wiring diagram:

The source code is available on Github: https://github.com/onebeartoe/lizard-enclosure

The continuous integration server is here: https://onebeartoe.ci.cloudbees.com/job/lizard-enclosure/

Thursday Aug 13, 2015

Bytecode and Generics

At the JVM Language Summit this week,  Java VM architect John Rose presented a session called ‘New Bytecodes, New Objects.’ He discussed the state of the JVM, as well as challenges and the future of the JVM

Java Language Architect Brian Goetz presented the Adventures on the Road to Valhalla. In the past year, he has worked on prototypes for generics over primitives and generics over values. In the presentation is goes over what he has learned, the design progress and the design implementation  

The JVM Language Summit videos are available on Youtube Java Channel

Wednesday Aug 12, 2015

Solving Problems Using the Stream API

Play a game while learning about Lambdas and Stream API!  Jose Paumard introduces Shakespeare Plays Scrabble game in a Java Magazine article of the same name. He shows how you can use the Stream API, which was introduced in Java SE 8, to solve a map/filter/reduce problem that is built on the Scrabble game. As Jose points out, Java SE 8 requires developers to think differently about their coding solutions. 

By following his Scrabble example, you can learn how to use the Stream API to address some common tasks in business applications--such as building histograms, comparing histograms, and handling corner cases raised by empty streams--efficiently and without using much code. 

Jose presented the same topic in a Virtual Technology Summit session. The session is now available online as a replay


Insider News from the Java Team at Oracle!



« November 2015