I Put a Spell on You
The arcane sorcery of bytecode manipulation
Earlier in the week, I wrote an article for O'Reilly's other Java site, attacking the question What Is Java as a means of resetting long-held (and often wrong) conventional wisdom about Java and trying to re-frame the discussion. A big part of the inspiration for this was several different trends that have to do with the JVM.
You can see this in Bruce Tate's Beyond Java; while decrying the complexity of the Java language and the platform, he holds the JVM in high esteem, predicting that any rival to Java will actually have to run on the JVM to make significant headway. That's because the JVM has solved some remarkable problems -- security, portability, etc. -- and with millions of JVM's already out in the field, who would want to re-solve that problem when they can just get a free ride?
Another data point in this trend is JSR-292, Supporting Dynamically Typed Languages on the Java Platform, which seeks to add a new bytecode called invokedynamic to the VM, so that it can better support dynamic languages. Think about it: even Sun is getting into the act of running stuff other than Java on the JVM.
Finally, there is the curious matter of bytecode manipulation. As an editor, this is a tricky topic: the material is so arcane, it resists treatment in article form because writing anything interesting requires that the reader already have mastered some very difficult material about the inner workings of the JVM. The worry I have about this kind of material is that it's very easy for the target audience of a bytecode manipulation article to be the author him- or herself.
Yet, bytecode manipulation is fascinating because there's seemingly no limits on what you could accomplish with it. Yes, I'm aware that's very much a double-edged sword. But consider the fact that it's already used in dependency-inversion frameworks, AOP frameworks, obfuscators, and more. You might be using it indirectly without even knowing.
Anyways, since JVM hackery is on the brain, the latest java.net Poll asks the question "What do you think of bytecode manipulation frameworks?" Cast your vote on the front page, then visit the results page for vote tallies and discussion.
In Projects and Communities, The tutorial Building Java GUIs with Matisse: A Gentle Introduction gets the reader up to speed with NetBeans 5's GUI builder. "Matisse is Java UI building done right. It is familiar, offers drag and drop placement, and sensible defaults that can still be altered and overridden easily for flexibility."
As part of a series interviewing finalists in the 2006 Independent Games Festival, Gamasutra talks with Sune Nielsen of Oddlabs, creators of Tribal Trouble, who discusses their work on the Lightweight Java Game Library (LWJGL) and also says "The smartest thing was without a doubt chosing java as a development platform."
In today's Forums,
cayhorstmann points to an Updated "Elvis meets Glassfish" article:
"I updated the 'Elvis meets Glassfis' article at http://horstmann.com/elvis/elvis-meets-glassfish.html for build 40. Most of the bug workarounds are gone, and I now use Sahoo's EAR file organization. If you read this forum, you probably know everything that is described in the article, but you may want to point your colleagues to it if they want an easy working example. If there is interest, I'll gussy it up with a JSF 1.2 web frontend."
soupdragon has a critical re-think in the thread
Re: Proposals for adding method support to Java?: "As far as I'm concerned anyonymous classes make the delegate concept completly redundant. What's the difference between a class creating a delegate on one of it's fuctions and createing an anomymous class instance that defines a method which calls that method?"
In Also in Java Today, Bart Smaalders discusses Performance Anti-Patterns in a recent ACM Queue article: "Performance pathologies can be found in almost any software, from user to kernel, applications, drivers, etc. At Sun we've spent the last several years applying state-of-the-art tools to a Unix kernel, system libraries, and user applications, and have found that many apparently disparate performance problems in fact have the same underlying causes. Since software patterns are considered abstractions of positive experience, we can talk about the various approaches that led to these performance problems as anti-patterns--something to be avoided rather than emulated." Also check an Artima discussion of this article and related performance pathologies.
Java Management Extensions (JMX) provide manageability for enterprise applications, but how do you get your apps instrumented for manageability, and exposed to some kind of console? The dev2dev article by Grace Lin, Managing Applications with HP OpenView, offers an introduction: "This tutorial focuses on JMX (Java Management Extensions) for the design of manageability of J2EE applications. I cover JMX basics and show how to instrument a simple J2EE application through JMX inside the BEA WebLogic Workshop 8.1 environment. I also introduce JMX Metric Builder, a tool that helps J2EE developers to configure their MBeans into a manageable metric, managed by a management application that is an HP OpenView BEA WebLogic SPI (Smart Plug-in)."
John Reynolds thinks about writing Software for Business People (like my dad) in today's Weblogs. "My father ran a small-town employee credit union in the 1960s and early 70s when most small organizations still used paper to store their records. Technology has dramatically changed, but in many respects businesses has not... Remembering this can help us write better software."
In Java Widgets, Changshin Lee wonders: "As I'm going to deliver some presentation on widgets such as Yahoo! Widgets (formely known as Konfabulator) and Google Desktop Sidebar, one idea hit me: Why not Java for widgets?"
Masoud Kalali says I want to share an RUP presentation that i have made before ... "This is a presentation that Introduce you the RUP (Rational Unified Process) , maybe this could help you understand some RUP basics..."
In today's java.net News Headlines :
- NetBeans 5.0 Plugin Developement Support Update 1 beta
- Axiomatic Multi-Platform C 1.3.9
- NetBeans IDE/BlueJ Edition
- Code Crusader 5.0.0
- DocWrench 0.7
Registered users can submit news items for the java.net News Page using our news submission form. All submissions go through an editorial review before being posted to the site. You can also subscribe to the java.net News RSS feed.
Current and upcoming Java Events :
- March 10-12, 2006 - New England Software Symposium
- March 11, 2006 - JCO JUG Meeting
- March 11-12, 2006 - Weekend With Experts
- March 15, 2006 - JavaUK06
- March 17, 2006 - 3rd IEEE International Workshop on Mobile Peer-to-Peer Computing (MP2P'06)
- March 17-19, 2006 - Twin Cities Software Symposium
- March 21-22, 2006 - Java Expo '06 at Sun Tech Days Madrid
- March 23-25, 2006 - TheServerSide Java Symposium
- April 7-9, 2006 - Greater Carolina Software Symposium 2006
- April 11-12, 2006 - Sun Tech Days - Sao Paulo
- April 20-21, 2006 - Sun Tech Days - Moscow
- April 21-23, 2006 - Western Pennsylvania Software Symposium 2006
- April 24-27, 2006 - MySQL Users Conference 2006
- April 25-28, 2006 - Enterprise Java Architecture Workshop Toronto
- April 28-30, 2006 - Northern Virginia Software Symposium
Registered users can submit event listings for the java.net Events Page using our events submission form. All submissions go through an editorial review before being posted to the site.
Archives and Subscriptions: This blog is delivered weekdays as the Java Today RSS feed. Also, once this page is no longer featured as the front page of java.net it will be archived along with other past issues in the java.net Archive.
The arcane sorcery of bytecode manipulation
- Login or register to post comments
- Printer-friendly version
- editor's blog
- 372 reads





