Posts in the “java” category

A Java FileFilter example

Summary: A Java FileFilter example, including a complete implementation of a Java FileFilter class.

I don't have much time for discussion today, but here's the source code for a Java FileFilter example I created in a text editor I wrote named "Jelly":

A Java JScrollBar example

I took a little time today to add some new features to my "JustWrite" text editor, and one of the features I'm experimenting with is an animation similar to the current horizontal scrolling area shown at the top of Apple's Mac web page. When you first hit that page the scrolling area is offset a little bit, and then in an animation the scrollbar moves more to the center of the scrolling display area.

Options to put your Java application name on the Mac menubar

If you don't do anything to your Java application on a Mac OS X system, your Java class name will appear in the Mac menubar. Of course, this isn't a good thing. There are a couple of things you can do to get the name of your Java application on the Mac menu bar, and I'll share all of the ways I know how to do this. I've listed these techniques in order here from "easiest" to "best".

Java architect's thoughts on Java 7 and Java 8

I just ran across this link in my email about the Chief Architect of the Java Platform Group at Oracle, with his thoughts about how to proceed on the Java 7 and Java 8 platforms releases. I haven't paid attention to the "New Java Features" world in a while, but it's a short, interesting read about how they're thinking about proceeding with the Java 7 and Java 8 platform releases.

Using the True License ObfuscatedString class

One of the things that isn't immediately obvious when using the True License Java license key manager software library is how to use the ObfuscatedString string class. In short, you're supposed to use this class to help obfuscate Java String objects that you might ordinarily include directly in your Java source code. If you're trying to protect your Java class (your intellectual property, or "IP"), you want to obfuscate these strings, otherwise they can be easily found by people trying to hack your code so they can use it freely.

Pure Java speech recognition

Summary: There is a Pure Java speech recognition project named Sphinx-4, which looks very promising. You can easily run their WebStart demo, and recently I've developed my own Java speech recognition app on top of Sphinx-4 to control my Mac OS X system.

So far this looks pretty sweet ... if you're interested in programming with speech recognition, a project named Sphinx-4 provides a Java speech recognizer, i.e., a speech recognition server written entirely in Java.

Mac speech recognition - How I control my iMac with speech recognition

Mac speech recognition software: I just had a fun interaction with my iMac that went a little like this:

Al is standing in kitchen, peeling an avocado. It's a little quiet, so he says, "Computer, play the movie Juno."

The computer says something snarky like "Yes, master" (or in Alaska, "You betcha"). In a few moments the movie begins playing.

Al smiles.

A JRuby jar include tip

Ever need to include a Java jar file in a JRuby script? As I work to convert my Mac speech recognition server to JRuby, the first task I need to tackle is to include the Sphinx-4 jar files in my JRuby path. You can include one Java jar file in your JRuby script path very easily, like this:

require 'lib/sphinx4.jar'

where the jar file 'sphinx4.jar' is in a local subdirectory named lib, which is cool. But if you need to include many Java jar files into your JRuby script at one time, here's a very cool way to do that:

Did Apple just kill Java support on Mac OS X?

With the announcement of the App Store for Mac OS X, Apple also released a Java upgrade, and their release notes contain this ominous verbiage for Mac Java developers:

Java Deprecation

As of the release of Java for Mac OS X 10.6 Update 3, the version of Java that is ported by Apple, and that ships with Mac OS X, is deprecated.

The release notes then go on to explain more about Apple/Mac Java being deprecated:

Mac Java deprecated - Steve Jobs and James Gosling reply

[Dateline: Friday, October 22, 2010, Talkeetna, Alaska.] After Apple very quietly announced that their Mac Java port is deprecated, a CIO wrote Steve Jobs, and Mr. Jobs sent his usual one-line reply. Next up, James Gosling, the "father of Java", replied to Mr. Jobs' comments, basically saying they were inaccurate.

Doug Lea leaving the Java Community Process

I was originally going to title this article "Is Oracle Killing Java?" and write about a number of recent events in the Java community, but I'll try to just stick to the most recent fact, which is that Doug Lea is resigning from the JCP Executive Committee. (JCP stands for Java Community Process.)

Oracle Apache JCP rift - Apache (ASF) resigns

Oracle Apache JCP rift: "The Apache Software Foundation has resigned its seat on the Java SE/EE Executive Committee (EC). Apache has served on the EC for the past 10 years, winning the JCP 'Member of the Year' award 4 times, and recently was ratified for another term with support from 95% of the voting community."

That's how to the Apache Software Foundation blog post begins when describing why they have quit the Java JCP EC. They later add:

Java App Store is dead (and Oracle killed it)

Java App Store news: I may have missed the announcement somewhere, but as I was researching Java on the Mac App Store, I just found that the Sun/Oracle Java App Store is dead. Here's an image of the Java App Store website:

Java App Store is dead

Java xeyes - Follow the mouse cursor location outside a JFrame

A Java xeyes solution - I started working on my Java speech recognition app again today, and in the process I saw some source code I thought I should post here. When I was developing this app, I thought it would fun to put a GUI on it, and when I thought about what sort of GUI it should have, I thought of the old X-Windows xeyes app. I looked around to see if anyone had written a "Java xeyes" application, but from what I've seen, nobody has.

Where are Java WebStart files kept on Mac OS X 10.6?

Mac Java WebStart FAQ: Where are Java WebStart files (Jar files) kept on Mac OS X systems? And how can I delete WebStart apps on a Mac?

Java WebStart Jar files are kept below this directory on Mac OS X 10.6:

/Users/al/Library/Caches/Java/cache

More than likely you're asking because you want to delete these Java WebStart files on your Mac. The easiest way to delete them is: