I had an interesting thought the other day for a project I'm helping a friend with. Many things we deal with come in key/value pairs (URL parameters for instance). Why not immediately work with objects instead? There's a simple way...
Probably someone is already doing this - there are certainly enough serialization libraries out there. But here's the thought - I was thinking of URL...
on Aug 16, 2008
Here is a simple pattern which you can use to make your
APIs extensible, even by third parties, without sacrificing
your ability to keep backward compatibility.
It is very frequent to create a library which has two
“sides” — an API side and an
SPI side. The API is what applications call
to use the library. The SPI (Service...
on Aug 11, 2008
Where's the state? This is a small but useful question when
deciding how a problem domain gets carved up into objects:
What things have state? What things have values that
can change? When and how can they change? Can the changes be
observed? Who needs to observe changes in state?
These questions make a good start...
on Aug 7, 2008
One thing which I think about often is the design of code,
and APIs. I've been working on
deriving some principles from the things I do intuitively based on
experience. Whether those are useful to anyone else is an open question.
Peer review is the best tool for figuring
out if these...
on Aug 5, 2008
Very soon, in a week or two, the Java compiler (javac), packaging tool (jam), and the Java module system implementation in the OpenJDK Modules project will support the new module keyword (the language support for JSR 277).
The engineering team have built a special workaround to enable ourselves to build the Java module system while waiting for the language support. With the javac and jam tool...
on Jul 25, 2008
I needed to load the classes from the dt.jar archive on the fly. The path to the archive was generated automatically based on the "java.home" system property. The original idea was to use the <a href="https://java.sun.com/javase/6/docs/api/java/net/URLClassLoader.html">URLClassLoader</a>, but it could not find classes. I had to write a custom class loader which read an...
on Jul 25, 2008
The draft specification for supporting OSGi bundles in the Java Module System is currently under discussion in the JSR 277 Expert Group.
To enable the EG and the community to provide feedback, we have included an OSGi repository prototype in the OpenJDK Modules project. The prototype currently supports only Apache Felix OSGi implementation for proof-of-concept. There are open issues to be...
on Jul 24, 2008
On May 23, I gave a presentation at Sun about computer science students,
and how a company can engage with them (audio | slides). Here
are some of the questions that I was asked, and the answers that I gave (or
wish I had given), and a question that I wish I had been asked.
What can we do to get more students to use OpenSolaris?
(Asked by two people in
marketing who were eager to give me...
on Jun 7, 2008
Day 4 of Java One is over. Even without huge announcements or great
surprises, it was a great conference. Here are my impressions from the cool
stuff keynote and my takeaway what it all means.
The Cool Stuff Keynote
My mind wanders during most keynotes, but I always enjoy James Gosling's
cool stuff keynote on the last day of Java One. No marketing, just one
amazing Java-powered piece of hardware...
on May 9, 2008
My day 3 at Java One ranged from the Nimbus UI and the future of JSF to
interesting discussions about closures and Scala. Details below.
The presentation on the Nimbus look and feel
was packed. Nimbus is a pretty L&F, and it will be the standard for Java
FX. Everything is vector-drawn, so it will scale nicely to high-resolution
displays. (Check out this nifty sampler.) I would like to...
on May 8, 2008
Another year, another JavaOne.
It's always great to see so many old friends again.
This year seems to be continuing the attendance growth trend of the last couple of year so that's a good sign. Also, I've been able to find enough actually interesting and useful talks to keep from going back to sleep and that's an even better sign. In particular, this is starting to show how the "Java community"...
on May 7, 2008
Last year, Java One Day 0 was Netbeans Day, in a cozy hotel. This year,
the Java One week started much more grandly, with Community One, at the
Moscone Center. There were tracks for a number of open source communities,
including NetBeans, GlassFish, MySQL, OpenSolaris. Frankly, I preferred the
cozy hotel, but I can see that it is savvy marketing by Sun to have a
large-scale free community event...
on May 5, 2008
I can't remember if my first JavaOne was the second or third but I've been to every one since and I'm still not considered Alumni. I've been to enough of them to remember when there was a huge buzz around the conference and you would walk out of the keynotes energized and couldn't wait to write something using the new toys.
I also remember Pat Sueltz on stage in her Howard Dean moment screaming "...
on May 5, 2008
I ran across this
tech tip on using wildcards in Java generics. Pretty basic stuff, I
thought. But I was amazed by the comments:
Great post!! never knew about wildcards
I cant believe this. I cannot think how a wild card in generics fits
into the java OOP theme. Upto now the rules were always simple
and straight forward. In this case list object should have
accepted all objects of...
on May 4, 2008
Yesterday, Apple released
Java SE version 1.6.0_05 for 64-bit Intel-based Mac OS X 10.5.2 or
It's restricted to 64-bit machines and Charles
is unhappy about it. Hopefully, they'll release a 32-bit
version as well.
Type "sw_vers" in a terminal to check the Mac OS X version as shown
ProductName: Mac OS X
on Apr 30, 2008
Apple yesterday pushed out Java SE 6 for Mac OS X. Software Update installs it as an additional Java run-time on your machine. Through the Java Preferences app (found in the Java folder in Utilities) you can set the default VM to use. After installing I set that to SE 6 and I am happy to report so far all is well!
Bahamontes, my own hobby project, works just fine including the Java 3D stuff....
on Apr 30, 2008
I know, I know, it's been far too long since I've made an entry. My younger son is ten months old now, so I suppose I should probably stop using "new baby" as an excuse for my laziness...
Before I joined Sun, I thought I knew a lot about Java. I had been using it for a decade and had dug into its innards more times than I could count. Anytime I ran into inexplicable Swing weirdness or...
on Apr 29, 2008
A draft specification for supporting OSGi bundles in the Java Module System is put together based on the past EG discussion in particular the proposals and inputs from Glyn Normington, Richard Hall, and Bryan Atsatt. It is expected to evolve based on further inputs from the JSR 277 Expert Group.
With the OSGi expertise from the JSR 277 EG and their contributions, we expect that this...
on Apr 28, 2008
I recently take on a new challenge and join the JSR 277 project working on JSR 277 and OSGi interoperability. There are lots to learn and I am trying to come up to speed as quickly and effectively as I can. Thanks to all the interests and excitements around this topic! I appreciate in advance the participation and contribution from the JSR 277 and 291 Expert Groups and the OSGi experts.
on Apr 18, 2008
JDK product registration is one of the most significant features in the new Java SE 6u5 release. This provides the ability to register the JDK installations through Sun Connection. Registering the JDK is optional. We would like the JDK registration to provide mutual benefits to both Sun and the developers.
JDK Installation Experience
There is a change in the JDK installation flow for this...
on Mar 6, 2008