Tag Archives: Java
Project Lombok – Never Write Boilerplate Java Code Again

Project Lombok – Never Write Boilerplate Java Code Again

(Click to enlarge)
If you read our recent article about Java 7 getting automatic resource management and were excited to never write boilerplate again, you need to try out Project Lombok.
Project Lombok (created by Reinier Zwitserloot and Roel Spilker) is a annotation processor compiler plugin for javac that provides a handful of very focused annotations for [...]

Read full storyComments { 3 }
tbm-ajax-base64-md5-generator-tools-screenshot

AJAX Base 64 Decode/Encoder & MD5 Generator Utilities

I would like to announce the launch of a couple new AJAX-enabled online utilities that software developers might find handy:

Base64 Encoder/Decoder
MD5 Generator

For those interested the utilities are written using the Play! Framework (Java) and JQuery/JQuery UI and the Base64 and MD5 generation is backed by the Commons Codec project.
These utilities are free to use, enjoy!

Read full storyComments { 1 }
thread-synchronization-performance-linux-java

Java IO Faster Than NIO – Old is New Again!

Alex Blewitt tweeted an article by Paul Tyma titled: Thousands of Threads and Blocking I/O: The old way to write Java servers is new again. Paul is the Founder/CEO of ManyBrain, the creator of Mailinator.
Paul’s 65-slide presentation is a fast read for anyone interested in Java I/O, especially in a client/server setup. What makes the [...]

Read full storyComments { 24 }
mongo-db-clean-shutdown-sequence

MongoDB (Single-Server) Data Durability Guide

If you are a MongoDB user or just interested in NoSQL databases in general, you may have seen the excellent “MongoDB has poor data durability by default!” (I am paraphrasing) conversation started by Mikeal Rogers.
It is an excellent topic to bring up and regardless of Mikeal’s association (he’s a CouchDB developer) I never once got [...]

Read full storyComments { 20 }
@Override Compiler Errors in Play! Framework “Must Override a Superclass Method”

@Override Compiler Errors in Play! Framework “Must Override a Superclass Method”

If you are working with the Play! Framework and have run into exceptions that read like “The file <MyFile>.java could not be compiled. Error raised is : The method <MethodName> of type <ClassName> must override a superclass method” then you might be wondering if there is a compiler bug in Play! – worry not, it’s [...]

Read full storyComments { 0 }

Use IHeaderResponse.renderJavaScript(CharSequence,String) to Avoid Duplicates

Apace Wicket Quick Tip
If you are working with multiple AjaxEventBehavior’s (like AjaxFormSubmitBehavior and AjaxFormValidatingBehavior) on similar components in a Page and you are using IHeaderResponse.renderJavaScript(CharSequence) it’s possible you are contributing duplicate JavaScript over and over again to the header section of your Page unecessarily.
As it turns out, by simply changing to use the IHeaderResponse.renderJavaScript(CharSequence,String) method (providing [...]

Read full storyComments { 0 }
walmart-mobile-web-site

Apache Wicket Powers mobile.walmart.com and mobile.wellsfargo.com

Update #1: From the same development team that did the mobile.walmart.com site in Wicket also clarified that they finished (last year) the mobile.wellsfargo.com website using Wicket as well. That’s some serious props to Wicket!
I am on the Apache Wicket mailing list and one of the developers (Joachim) on the list wrote in this morning to say [...]

Read full storyComments { 0 }
Myriad Announced Dalvik Turbo – Android Gets 3x Speedup

Myriad Announced Dalvik Turbo – Android Gets 3x Speedup

Engadget covered a story about the company Myriad Group AG that was showing off their “Dalvik Turbo VM” product at the Mobile World Congress. At their booth they had an OpenGL demo running on two Google Ion (HTC Magic) phones, about 1/2 the horsepower of a Nexus One.
In this particular “spinning 3D box” demo, the [...]

Read full storyComments { 0 }
sun-java-streaming-xml-stax-parser

XMLStreamReader getAttributeValue Bug Returns Null

I’m documenting this issue (and fix) here for anyone else Googling for an answer. I just did for about an hour and found no answer, but instead stumbled across the solution.
If you are using anything from the javax.xml.stream packages in Java 6 or later, you are using the Sun Java Streaming XML Parser (SJSXP) implementation [...]

Read full storyComments { 0 }

SmugMug Downloader Web Start Link Fixed

It looks like on Mac the Java Web Start JNLP file used to launch the SmugMug Downloader had an invalid reference to itself and was failing to load — it seems on Windows this was working anyway.

Read full storyComments { 0 }

Did You Know enums Can Define Their Own Methods?

… I sure as hell didn’t, but found myself in a position the other day where I was thinking “Damn, I wish I could define a common method in this enum that I could call and not have to write another utility method…” Well, ask and ye shall receive… or something like that.
Here’s the enum [...]

Read full storyComments { 4 }
java-exception-explanations

Explanations of Common Java Exceptions

Huge thanks to Marc Chung for sending along this great reference. It’s a breakdown of all the JDK exceptions and textual descriptions of what they represent — so if you are designing your own API or just working on your own app and want to make sure your use of particular exceptions (e.g. IllegalArgumentException) is [...]

Read full storyComments { 0 }
javafx-media-player-loading

JaxaFX 1.0 Released – Not a Great First User Experience

Please keep in mind I’m wearing my “Joe average user” hat that this platform is suppose to target as a delivery platform (and simplify developer’s lives in the process).
I’ll admit that I’ve always had trouble with the Java plugin and Firefox on my old Windows XP SP2 desktop, Windows XP SP3 laptop and my Windows [...]

Read full storyComments { 0 }
groovy-logo

Is Java Becoming Irrelevant?

Update #1: To clear up any confusion, this article is focused on the business value of Java – it’s ability to control and generate revenue – not it’s value as a language or a technology. So the word “irrelevant” is applied to it’s business value, not if it’s a good technology or not.

Sun Microsystems announced [...]

Read full storyComments { 0 }
Sockso with Playlist

Sockso Personal Music Server

If you have ever wanted to have access to your personal music collection from anywhere on the road Sockso Personal Music Server just might be the answer you were looking for. All that is required for the installation is Java and a Windows, Linux, or Mac box to run the server on. The software has [...]

Read full storyComments { 0 }
ZK Demo Welcome screen

Setting up Apache Tomcat 6.x and ZK in Ubuntu

Apache Tomcat is the name in JSP, and you’ll need to get a copy before being able to try out the many cool web applications and frameworks out there (like ZKoss’s ZK). Finding a development need to run JSP pages (and wanting to try out ZK), I decided to get the latest Tomcat version [...]

Read full storyComments { 3 }
netbeans-61-zk-design-palette-plugin

ZK 3.5.1 Released – RIA Framework, NetBeans Plugin and Tutorial

This past week ZKoss refreshed their flagship product, ZK, to version 3.5.1. If you haven’t heard of ZK before, it is a very slick framework which was “designed to maximize enterprise operation efficiency and minimize the development cost [with] its groundbreaking Direct RIA architecture. ”
Unlike most marketing ploys used to overstate the capabilities of a [...]

Read full storyComments { 0 }
Samsung HL-S7178W Picture #4

What's the Best Way to Handle Exceptions?

It seems, given my limited experience, that handling exceptions depends entirely on the context in which you are developing. As a fan of “rules” that can be applied to different scenarios I wanted to hit you guys up and see what the rules-of-thumb were with regards to exception handling.
Some approaches to exception handling sort of [...]

Read full storyComments { 0 }
java-logo

Sun, IBM and Microsoft Host Workshop to Combine VM Efforts

Sun recently held a 3-day workshop where technical leads and directors from IBM and Microsoft were invited to join together at the Sun campus to try and work on consolidating Virtual Machine efforts going forward; more specifically focused on developing solutions that would yield Java-like performance for Ruby, Python, PHP, and Scala on the JVM.
No [...]

Read full storyComments { 0 }
Java over Blurred Ruby

Using XRuby to Speed up Ruby Script Performance

Do you want to squeeze the most performance out of your Ruby scripts? If so, you might be interested in a little project called XRuby.
According to the website “in most benchmark tests, XRuby runs faster than Ruby 1.8.5″. Personally, I was a bit skeptical, and you may be too. So let’s explore this [...]

Read full storyComments { 0 }
djproject-vlcplayer-embedded-in-swing

Spruce up the Desktop Java Experience with Native Objects

The DJ Project is a cool project that allows native objects to be integrated into Swing applications. You want to add a web browser to your java app? No problem. How about a flash player, or html editor? Done. The site may not look like much, but you can tell the [...]

Read full storyComments { 0 }
mozilla-tracing-jit-comparison-video

Tracing JavaScript Engine Coming in Firefox 3 Could Give 20-40x Performance Boost in Some Scenarios

Ars has a piece up about the Tracemonkey JavaScript engine work that we will first see in Firefox 3.1 (currently in nightlies) but is the first part of major JavaScript work known as Tamarin that won’t be seen until Firefox 4.0.
Apparently the Mozilla JavaScript engine is getting worked over from the ground up with an [...]

Read full storyComments { 0 }
Easy Encryption in Java and Python with Keyczar

Easy Encryption in Java and Python with Keyczar

Do you need to encrypt small text data, like serial numbers or customer numbers in your web application?  With the amount of data being transmitted online and the increasing need to protect customers against identity theft, encryption is the one and only choice to keep customers safe. Unfortunately, implementing encryption is a daunting task [...]

Read full storyComments { 0 }

Using 'resources' path in Wicket Causes Problems Loading CSS, Images and JavaScript

Bah… 3 hours worth of debugging and finally figured out what was going on with this issue in Wicket and wnated to share this with any other developers out there that might be running into this.
Issue
I typically create a /resources directory under the root of any web app I’m working on where I places CSS, [...]

Read full storyComments { 0 }