Software Demo Movies

I’ve added some notes on video screen capture for software demos over on Random Tech Notes. This isn’t strictly Java-related, though I’ve been experimenting with screen recording in the context of capturing a Java application that has animation and audio synchronized to user interaction, two factors that complicate the task a bit.

Headless Exception Work-Around

On upgrading a piece of (1.4-dependent) server-side software from 1.4.2_01 to 1.4.2_14, I began seeing errors that looked like: java.awt.HeadlessException at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice (HeadlessGraphicsEnvironment.java:66) at javax.swing.RepaintManager.getVolatileOffscreenBuffer (RepaintManager.java:537) at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4727) at javax.swing.JComponent.paint(JComponent.java:798) at edu.vt.cs.collab.cork.impl.servlet.CORKServlet.encodeComponentAsJPEG (CORKServlet.java:617) at org.isenhour.fin.inc.CEFChartWebView.writeChartImage(CEFChartWebView.java:97) at org.isenhour.fin.inc.CEFChartWebView.writeStaticContent(CEFChartWebView.java:84) at edu.vt.cs.collab.bridge.DefaultWebViewServlet.doGet(DefaultWebViewServlet.java:95) at edu.vt.cs.collab.cork.impl.servlet.CORKServlet.doGet(CORKServlet.java:293) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) …. The offending code segment was: img = new BufferedImage(sz.width, sz.height, BufferedImage.TYPE_INT_RGB); …

Compressing Socket Data

The java.util.zip package includes classes for compressing and decompressing data using the ZLIB algorithms. The stream classes in the package are well-suited for accessing files and other bounded data, but do not work as well for compressing unbounded, continuous data transmitted over a socket. “Compressing data sent over a socket” describes the underlying issues and …

Lucene In-Memory Search Example

Apache’s Lucene text search library provides powerful and flexible tools for searching collections of text. While the indexes that Lucene builds are often stored on disk, the libary includes the ability to create an index in memory. This is particularly useful in restricted environments such as unsigned applets and WebStart applications. “Lucene In-Memory Text Search” …

Testing Strings for Equality

Strings are Objects in Java, but the ability to use literals, along with the String concatenation operator, make them somewhat similar to primitive types. Java also automatically “interns” String literals, meaning that a single String object will be created for a literal that is used multiple times. “String Equality and Interning” describes the effect of …