Recent Blog Posts
Blogs » Java EE
The Daily Grind
: Java EE BlogLearn J2EE programming with passion
Ready to get serious about learning Java Web application and enterprise application development? I can’t say I blame you — those skills will net a pretty penny in the current job market. That’s why J2EE Programming (with Passion!), a free online class offered by Sun Microsystems employee Sang Shin in his spare time, is such an amazing opportunity.
Offered by means of a Yahoo! Groups discussion list, the class runs for about the length of a university semester. Once you subscribe, you’re responsible for reviewing the weekly pre-class reading material, reading the classroom slides with accompanying notes, and completing the assigned coursework and final project by the assigned dates. It’s just like taking a university class only you don’t have to show up at lectures… oh, and did I mention it’s free?
If you’ve been awaiting an opportunity to learn J2EE in a structured way without shelling out a bunch of money on books and classes, this might just be the ticket. Sang Shin also offers a few other online classes, an advanced J2EE class among them.
The next session of J2EE Programming (with Passion!) starts September 26th. Time permitting, I plan to participate.
Java applets to gain new life in Mac Firefox
(Via MozillaZine) Firefox 1.5 for Mac OS X will have the Java Embedding Plugin built in to allow the browser to take advantage of the latest version of Java on that platform.
Java applets have had a rough time of it, as technologies go. Hyped beyond all reason when it first emerged, the technology was quashed by Microsoft’s sabotage of Java with the continual re-release of its out-of-date and stagnant Java Virtual Machine (VM).
Today, Java applets are an extremely capable technology. An ideal platform for building many of the rich Internet applications that everyone seems to be talking about, its biggest disadvantage continues to be the limited availability of the current version of the technology in Web browsers.
This is changing, however, with big-name PC builders like Dell and HP shipping their machines with Java preinstalled. Currently, one of the most troublesome holdouts is Firefox on Mac OS X, ironic since Apple is renouned among Java developers for supporting Java by building it into its operating system. Though Mac OS X has Java 1.4.2 built in, with experimental support for Java 5, Apple’s API for 3rd party Web browsers like Firefox is frozen at the now-obsolete Java 1.3.1, forcing applet developers who …
Java SE 6: what’s in a name?
Sun has finally made a sensible decision when it comes to the naming of Java. To see how unprecedented this is, let’s stop for a quick history lesson.
In 1996, there was Java 1.0. A year later, we got Java 1.1. Then at the end of 1998 Java 1.2 came along, but Sun’s marketing brains belatedly decided it was worthy of a whole new version number, so it was renamed after release to Java 2 version 1.2.
By the end of 2000, Java had been split into three segments: Java 2 Standard Edition (J2SE) version 1.3, for desktop application development; Java 2 Enterprise Edition (J2EE), which extended J2SE to building enterprise apps (including Web sites); and Java 2 Micro Edition (J2ME), a stripped-down version of Java for building applications for mobile and embedded devices.
J2SE 1.4 came out in 2002, and then in 2004 we got J2SE 1.5. Once again, Sun’s marketing department stepped in at the last moment and gave it a new version number: Java 2 Standard Edition 5.0, version 1.5. It it weren’t true, it would be unbelievable.
This week at the JavaOne conference, Sun announced a new naming scheme for Java. Not only is it sensible for once, but it’s …
Jetty really is lightweight!
Today I took some time to deploy and fine tune a new MP3 jukebox with a Web interface to improve the level of aural democracy here at SitePoint HQ. As I’ve mentioned here before, I’ve written it as a Java Web application because what it needs to do on the server side is a lot more complex than anything I’d like to tackle with, say, PHP.
When the application starts up on the server, it creates a socket connection to the jukebox server (which happens to be running on the same machine). The jukebox server notifies the Web application of changes made by logged-in users. Speaking of which, each logged-in user creates an additional connection to the jukebox server, in order to issue commands on behalf of that user.
Although the interface is still fairly utilitarian, it’s coming along nicely:

Getting the application up and running took all of 30 minutes, including downloading and setting up Java, Tomcat and Ant, building and configuring the jukebox server from CVS, and installing my compiled Web application. But my work didn’t end there.
The computer in our server rack that is dedicated to the MP3 jukebox is quite a crusty old thing (a Celeron 533MHz …
Swing Renaissance - Cool Java UI Examples
These days, there are two popular toolkits for building graphical user interfaces in Java: Swing (from Sun) and the Standard Widget Toolkit (SWT) (from IBM/Eclipse). Different developers often have strong opinions about which is best, but in truth they both have their strengths.
Swing
Swing, part of the Java Foundation Classes (JFC) first introduced with Java 2 (J2SE 1.2), is the “official” (if you will) GUI framework for Java. It’s built into the desktop version of Java (J2SE). Swing’s approach is to make user interface components (widgets) as customizable and extensible as possible without sacrificing cross-platform consistency.
To do this, it avoids using the operating system’s built-in widgets and instead uses pure Java code to draw the user interface in blank windows and respond to interface events.
The upshot of this is that all of its components are fully skinnable, and can be extended with custom appearance and behaviour. The downside is that the user interface often doesn’t quite match the look and feel of the native operating system (although Sun is getting better and better at this). Additionally, the API can get quite complex as soon as you want to do something not-quite-standard, because of Swing’s amazing flexibility.
Also, because of Swing’s complexity, it’s …
Another passenger on the Eclipse bandwagon: Flash?!
Macromedia has joined the growing masses busily porting their top-end development tools to the Eclipse platform.
In a flurry of press releases and publicity on its website, Macromedia this week announced the Flash Platform, which really isn’t anything new — just a, er, flashy reminder of everything that Flash can do.
What is new, and of particular interest to Java developers, is the news that the next-generation development tool (codenamed “Zorn”) to replace Macromedia’s custom-built Flex Builder IDE will be based on the Eclipse platform.
Flex is a platform for rapidly developing Web applications that use rich, Flash-based interfaces generated on-the-fly on the server side, and that interact in real time with server-side applications, typically written in Java. Although this is an amazingly slick and powerful development environment, I think it’s safe to say that uptake has been slow among Java developers, who are typically reluctant to leave their development tools of choice to try a custom IDE.
Moving Flex development to the Eclipse platform will not only put the technology directly in the sights of millions of Java Web developers, but it will also enable them to continue using their favourite Eclipse plugins as they build rich Internet applications with Flash. With Borland …
Some IDE news
Looks like it’s Integrated Development Environment (IDE) season again…
Eclipse 3.1 is just around the corner with the first release candidate (RC1) now available for download. Support for Java 5.0 is the biggest thing on the list that I like, though support for Ant 1.6 is nice too. It might be time for me to give this thing a try…
NetBeans 4.1 is now out, and is getting some requisite post-release buzz from Sun. This free IDE that forms the foundation of Sun’s Java Studio Creator and Java Studio Enterprise IDEs now provides its own support for Web development with J2EE 1.4 support, and mobile development for MIDP-capable devices. NetBeans was the subject of a live chat hosted by Sun in May. The transcript is now available for more casual perusal.
JBuilder continues to hype its use of Eclipse as the foundation for future versions. In its just-announced product roadmap, Borland announced that JBuilder 2006 will ship before the end of the year with expanded team development features, such as shared code views and debugging sessions. The much-hyped “Eclipsed” version of JBuilder will ship next year, and is codenamed “Peloton”.
IntelliJ IDEA isn’t standing still either. JetBrains is offering free upgrades to version 5.0 …
Playing MP3s with Java
In my off hours, I’m building a spanky Web interface for JJukebox, an open source, multi-user MP3 jukebox server. We take our music pretty seriously here at SitePoint HQ, and it’s time our rusty, old, Perl-based MP3 jukebox software got a revamp.
If there is one weak point in the JJukebox server implementation, it’s the audio playback–specifically, the handling of MP3 files. Despite all its cutting-edge vitality, Java’s support for multimedia is in a sad state indeed.
Going by the book, the Java Media Framework API (JMF) is a one stop shop for capture and playback of all kinds of streaming media. Though MP3 support was removed after JMF 2.1.1a due to the same patent issues that are affecting other open source MP3 software, the Windows version of JMF 2.1.1c reinstated MP3 playback by using the MP3 support in Windows, and since November JMF 2.1.1e now has a MP3 plug-in for all supported platforms (Windows, Linux, Solaris, and a cross-platform version).
Unfortunately, JMF is reportedly incompatible (or at least buggy) with Java 5, and the only sign of life for the API is a comment left by the manager of the Java Client Group’s Swing team on April 12th to the effect that …
The Grand Tour: A crash course in Java-less JSP
It’s time to take the Java out of JavaServer Pages.
In the last instalment of my “Grand Tour” of Java Web application technology, we split our to-do list Web application into three parts: the model, classes that manage the data at the heart of our application; the controller, servlets that process incoming requests and then send display values to the view; and the view, JSP files that generate Web pages from those display values.
While this separation generally did a good job of separating the Java application logic from the HTML user interface code, it still left us with some Java code in our JSP file(s). This code was needed to grab the values supplied by the controller and massage them into our HTML interface. We’ll call this display logic.
This time around, I’ll show you how to get rid of the Java code in your JSP files, and implement that display logic with a simpler and more powerful alternative.
Let’s start by reviewing just what the Java display logic in our example’s JSP file does. First it gets the list of items supplied by the controller:
List toDoItems = (List)request.getAttribute(”toDoItems”);
Iterator it = toDoItems.iterator();
Then it checks if there are any items …
Sweeten your source with the best monospaced fonts
Programmers like me spend all day looking at code, so it makes sense to take a few minutes to find the font that works best for you. The problem is that, for whatever reason, monospaced fonts (the fonts used to display code, in which all characters have the same width) have always been difficult to track down.
Thankfully, Trevor Lowing has done the hard yards and assembled comparative bullet-point reviews of what he considers to be the top monospaced fonts. You can read his assessment of each font, preview it in a code-oriented screenshot, and even compare the fonts side-by-side.
Download links are provided for all the fonts he reviews, which suggests he has confined his review to freely available fonts.
His top choice of Bitstream Vera Sans Monospaced is a little narrow for me, but Apple’s Monaco (4th place) is certainly a pleasant change from Courier New. jEdit, my editor of choice has never looked better!
Which is your favourite?
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.
Want More Traffic?
Get up to five quotes from qualified SEO specialists, with no obligation!
Download sample chapters of any of our popular books.



