The Source for Java Technology Collaboration
User: Password:



Editor's Daily Blog

Someday Right Now

Posted by invalidname on October 30, 2008 at 08:16 AM | Comments (2)

Clinging to Java SE 5?

Today's feature article takes a somewhat roundabout way to get pixels from OpenGL (specifically JOGL) over to a Swing GUI. Rather than using the provided AWT or Swing components, it renders its pixels to an OpenGL pbuffer, and then copies those pixels into a Graphics2D. The authors' benchmarks show the performance hit isn't bad, and I think it's an interesting thing to study because there's an underlying common problem: when you use frameworks that weren't built to work with one another, you have to find some lingua franca for data exchange between them. In graphics, that often means you need to be able to render into some kind of easily-expressed pixel format (say, 32-bit ARGB) that can then be copied from one framework's buffer to the other. I did the same thing a few years back getting pixels from a QuickTime for Java video capture buffer into a Graphics2D, and anyone working with audio might see a commonality with decompressing to PCM and copying over samples. In server-side frameworks, maybe you're just exchanging Strings or XML documents (or POJOs, if everything's in the same VM, ala Seam). But there's an underlying pattern here, and using pbuffers as an OpenGL-to-Java2D bridge may have other useful applications.

That said, it's kind of interesting that the authors acknowledge in their conclusion that the technique isn't really necessary if you have Java 6, which allows hardware-accelerated JOGL spaces to co-exist nicely with Swing. In fact, that may be optimal, considering that the pbuffer approach requires you to determine at runtime if the current configuration can even use pbuffers. So why not just use Java 6? Seemingly, a lot of people can't or won't. Setting aside the situation on the Mac, where Java 6 is 64-bit Intel only, getting a newer version on the end user's computer may be a challenge. 6u10 will do much to improve this with its incremental downloading and performance improvements, but a year after Java 6's release, we wouldn't be talking about this if getting new versions of Java out in the field weren't a long-standing problem.

Is the problem of getting users to upgrade their version of Java getting any easier? Or are there too few people deploying applets, JNLPs, and double-clickables to even have an idea of where we stand on this?


Getting back to our Feature Article, it is a treat to delve back into JOGL, in Integrating GLPbuffer and Java Graphics2D. In bringing a mathematical visualization app to Java, Joshua A. Davis and Thaddeus Keenan Simons found that using OpenGL, via JOGL, offers huge benefits for 3D rendering. However, they wanted to make sure that the JOGL components would coexist with the rest of the Java GUI. In this article, they show how they integrated OpenGL pbuffers into ordinary Graphics2D rendering contexts to achieve a balance.


In Java Today, the second Release Candidate of NetBeans IDE 6.5 is now available for download. The release is also multilingual - downloads are available in Japanese, Simplified Chinese, and Brazilian Portuguese. The focus of NetBeans IDE 6.5 is simplified and rapid development of web, enterprise, desktop, and mobile applications with PHP, JavaScript, Java, C/C++ , Ruby, and Groovy. New features for 6.5 include a robust IDE for PHP, JavaScript debugging for Firefox and IE, and support for Groovy and Grails. This release also offers a number of enhancements for Java, Ruby and Rails, and C/C++ development. Java feature highlights include: built-in support for Hibernate, Eclipse project import, and compile on save. The Release Candidate improves on the support offered in NetBeans 6.5 Beta. The final NetBeans IDE 6.5 release is planned for November 2008.

The Javapedia blog (not to be confused with java.net's own JavaPedia) has posted a detailed guide to Debugging Java Code in the CVM. "CVM supports the JVMDI, so you can connect a JPDA debugger to it without involving a separate debug proxy of the type used by KVM. However, before you can start debugging, you need to do two things: 1. Build the CVM with the CVM_DEBUG and CVM_JVMDI options to the make command set to true; 2. Build the library libjdwp, which contains the native code that implements the Java Debug Wire Protocol (JDWP). This protocol allows debuggers to connect to the VM over a socket or using shared memory."

JavaFX guru James Weaver has posted some tips for Getting Ready for the Imminent JavaFX SDK 1.0 Release. "As you may know, the OpenJFX Compiler project has been making improvements to the JavaFX language out in the open, so I'd like to get you up to speed on these in preparation for when the entire JavaFX SDK 1.0 is released yet this fall. Today I'll discuss some of these language changes." He covers the def keyword that defines constants, var's replacement of attribute for declaring instance variables, and a few small points involving println and return values.


Today's Weblogs begins with A little surreality to brighten your day from Tim Boudreau. "Since I'm back to working in development full-time, I've been setting up a fine little desktop machine. In the process I ran across one of the weirdest bits of software I ever wrote, now available to you too."

Jean-Francois Arcand kicks off a new tips series in Tricks and Tips with NIO.2/AIO part 0: A new beginning. "In this new installment series of tricks in tips, I will start sharing my observations with the upcoming NIO.2 (Asynchronous I/O) support in JDK 7 (jsr 203). The idea is simple: I've already added some support inside the Grizzly Framework, and will share what I've learned/measured. Everything is new, from the JDK to upcoming Grizzly 1.9.0 AIO support so it is time to share again!"

Finally, in Pivot Faces the "One Million Records" Challenge, Greg Brown is "Accepting Richard Monson-Haefel's "One Million Records" challenge on behalf of the Pivot platform."


In today's Forums, jsl123 would like to keep track of resource usage automatically, in Monitor active connections in a JDBC pool over time - possible?. "Hi, is there an (easy) way to monitor the number of active connections in a database pool over time. I'm often in a situation where i've run out of available connections in the pool. I've tried increasing the max number but without success. So would like to monitor them over time to see if i can spot any pattern and work out what is either using them all, or not freeing them up."

Shai Almog explains how to live without Thread.stop(), in Re: Threads In LWUIT. "In Java ME there is no thread.stop method and that method is deprecated in Java SE. This is unrelated to LWUIT, you can turn on a flag in your code which is what we (and everyone else) do when we provide a cancelable task."

Continuing yesterday's highlighted discussion, Re: Can the Plug-in compete?, cowwoc talks about community involvement: "marvinpwarble, I agree with you on many levels. We need a client-side community effort that documents the issues, prioritizes them, and begins addressing them one by one. I agree with you wholeheartedly that "If I have to write my own plug-in in order for it to be competive, than Sun really isn't doing me any favors." People have been using open-source as an excuse to avoid fixing real problems. I believe there are two reasons nothing has been done yet..."

Finally, Ove Nordström asks about the feature sets of Sun Wireless Toolkit Client (SJWC) 2.0.1.0.07 and phoneME Feature. "I have got a new HP Ipaq 914, nowadays it also includes Sun Wireless Toolkit Client (SJWC) 2.0.1.0.07. I have understand that SJWC is phoneME Feature + SUN have added optimizations and commercial value-added components , such as optional JSRs, platform tuned optimizations, etc. But what version of phoneME Feature is SJWC 2.0.1.0.07 based on? Which JSRs are supported by the implementation on SJWC 2.0.1.0.07? Is SJWC 2.0.1.0.07 supported in Netbeans 6.5?"


Current and upcoming Java Events :

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.




Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • In a corporate environment the version of Java installed on users pcs is largely driven by the software they use. If they are using a Swing client in a client/server system, this includes the app server and what version it supports, and the apps and libraries running on the server. The lowest version wins. Upgrading to a new version requires an investment in testing, and redevelopment, that is typically hard to sell to stakeholders. Hence there are many companies that are still using Java 1.3 or 1.4 on all their machines.

    Posted by: mackiet on October 31, 2008 at 05:56 AM

  • > Clinging to Java SE 5?

    No actually, we're clinging to Java 1.4.2.

    Posted by: lafery on November 03, 2008 at 08:48 PM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds