Skip to main content

More Adventurous

Posted by editor on October 5, 2007 at 8:23 AM PDT


From the lowest-level language to one of the highest

Understand and believe that when articles are proposed, I do make the author justify "why it matters" to readers, so that you don't see 2,000-word treatises on concepts of purely academic interest with little or no practical application. I bring this up because the premise of today's new article -- calling Java from assembly language -- might well bring hackles of impracticality.

Biswajit Sarkar has already covered invoking assembly code from Java, which has a straightforward usefulness to those seeking performance in critical sections of code. But when he proposed going in the opposite direction, from assembly to Java, I had to ask "why would anyone ever need to do that". He replied in his second draft with an anecdote to say that he'd already been in a position where this was the right approach:

Some time ago, I was associated with an application to collect real-time data from a number of sources and save them in circular buffers so that new data would overwrite old data once the buffer got filled up. If a designated trigger event was sensed through a digital input, a fixed number of data samples would be saved in the buffers so that a snapshot of pre- and post-trigger data would be available. The original application was written in assembly language. After the application was used for a few months, it was felt that it would be very useful to have the application mail the snapshots to authorized supervisors whenever the trigger event occurred. Of course, it would have been possible to write this extension in assembly, but the team felt that in that particular instance it was easier to write that extension in Java and hook it up with the ASM program. As I had earlier worked with ASM-oriented JNI, I knew this could be done and, indeed, the project was implemented quickly and successfully.

Even if you're not an assembly language programmer with an occasional need to call out to Java's many capable libraries, taking another tour into the specifics of how JNI manages interfaces to native code may be useful for understanding just how your Java code interacts with the system.

So I hope you'll enjoy this Feature Article,
Launch Java Applications from Assembly Language Programs. Actually, with a lot of legacy assembly code out there, it's entirely possible that there could be some novel uses for the idea. Perhaps an assembly language program on an old mainframe could be exposed as an SOA by writing a small amount of new assembly to call out to Java-based SOA libraries? Who knows... we'll see if this is an idea that gains traction.


Unknown and undocumented properties are the focus of two of today's Weblogs, starting with
Jean-Francois Arcand's
Customizing GlassFish v2 with 23 unpublished properties.
"Grizzly in GlassFish v2 has 23 unpublished properties that can be used to improve performance, switch the thread pool, configure the tcp stack, etc. Why hide them?"

In a similar vein, Sergey Malenkov discusses
JavaBeans: feature attributes.
"Let's talk about the FeatureDescriptor class, the superclass for all other descriptors. It enables to add extra metadata to describe the beans. The builder tool could use such metadata to provide enhanced functionality."

In a good news update, David Herron reports on
OpenJDK Encumbrances being cleared.
"The OpenJDK project is about 95% of a complete Java implementation. That last 5% or so is what we've called 'encumbrances', code which we weren't able to open source. The last two weeks have seen a lot of interesting movement..."


Speaking of the JDK, the latest java.net Poll asks "Have you tried out the Java SE 6.0 Update N (aka, "Consumer JRE") Early Access?" Cast your vote on the front page, then visit the
results page for current tallies and discussion.


In today's Forums,
jfbriere wonders about 6.0uN's QuickStarter feature in
This is really great.
"First I want to thank Sun for this JQS feature. It works pretty smooth on Windows 2003 and also on XP (both witth Firefox 2 and IE 7 or 6). I think it's an important milestone in the Java client evolution ( or revolution. Just curious about one thing. It is said that JQS is : "periodically prefetching some of the most heavily used Java Runtime Environment files into memory". Although I executed many Java applications, webstarts or applets I failed to see in the task manager the jqs.exe memory usage going more than 1.5 Mb. Which files are typically prefetched?"

jmelvin explains the status of QuickStarter code in
Re: Why is the quickstarter not available on non-windows platform.
"The JDK source for all supported platforms is available through the OpenJDK project. However, the Sun deployment code (installers, plugins, and java web start) are not. We plan to make these components available as resources become free. JQS is part of the deployment component."

Finally, fester volunteers for some localization work in
JFileChooser dutch translation.
"JFileChooser seems to be translated by default in Spanish, German and French (maybe others too, I have not checked). When the Locale is Dutch, there is no translation. How can I provide one?"


In Java Today,
the NetBeans Portal Pack 2.0 Beta is now available. The zip archive of Portal Pack plug-ins can be downloaded from Portal Pack project site. These plug-ins are also available on NetBeans 6.0 Beta 1 Auto Update Center. Features include support for both Portlet 1.0 (JSR-168) and 2.0 (JSR-286) standards, a new wizard to create portlet filters, an option for adding a new Public Render Parameter through UI, and drag and drop support to map Public Render Parameters/Filters to portlets.

The latest issue, number 141, of the JavaTools Community Newsletter is out, with tool-related news from around the web, announcements of new community projects and graduations (AntUtility and Textile-J), a reminder about the Mobile & Embedded Developer Days Conference, and a ToolTip about SCPlugin, which brings Subversion access to the Mac OS X Finder.

The NetBeans OpenLaszlo Support plugin adds support for OpenLaszlo, a Flash-based Rich Internet Application web framework. It allows you to develop RIA applications using XML and Javascript on the UI and Java on the server, without any knowledge of Flash itself. Current features include bundling the OpenLaszlo 4.0.2 library into NetBeans's libraries list, providing the main OpenLaszlo 4.0.2 sample application (with full developer documentation) as a sample project under "Samples / Web", recognizing .lzx files as XML and opening them in the XML editor with full Navigator support, providing XML code completion, and more.


Current and upcoming Java
Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e">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 href="http://today.java.net/today/archive/">java.net Archive.

From the lowest-level language to one of the highest