All | 43 Folders | Accessibility | BoingBoing | Books | Computer Related | Family | Films | General | Hacking | Hobbies | Humor | Java | Links | Omni | Puzzles and Games

20061114 Tuesday November 14, 2006

Open Source Java

A day late I know, but I'd still like to personally thank Jonathan and Rich and Simon and everybody else who were involved in removing the final barriers and allowing Java to be finally released under a real open source license.

eWeek also has a good writeup on what happened yesterday.

When I released my small piece of the Java world under an LGPL licence about two ½ years ago, I had to go around and get sign-off from five VP's (including Jonathan), two CTO's and I forget how many lawyers. At the time I was really worried that our upper management still didn't fully understand open source.

I'm not worried any more.

Another thing that really impressed me with the recent Java announcement is the way that the Sun bloggers were treated. We had the opportunity to attend a briefing conference Sunday afternoon (Pacific time), then, when the press embargo was lifted at 9pm that night, Sun bloggers were given the go-ahead to blog about it, even before the official Sun announcement on the Monday morning.

I know I'm biased, and love this company, but sometimes you just have to put your marketing hat on and say "Way to go Sun!"

[]

[]

( Nov 14 2006, 08:37:33 AM PST ) [Listen] Permalink Comments [2]

20060921 Thursday September 21, 2006

Sun Releases NetBeans Version for Beginners


As somebody who has tried NetBeans at several different times (typically when a new major release has been announced), looking for a really simple, ease to use IDE, without having to spend a lot of time learning how to drive it (because I don't have that time), this is refreshing news.

I tried BlueJ a couple years ago, and it was just what I had in mind (except that it didn't support the then latest version of Java, which was what I needed for what I was testing).

The merging of these two tools will hopefully provide a perfect transition for me, to the more fully-featured NetBeans environment.

For more information on the NetBeans 5.0 IDE BlueJ edition, checkout their website.

[]

[]

[]

[]

( Sep 21 2006, 09:44:46 AM PDT ) [Listen] Permalink

20060516 Tuesday May 16, 2006

JDK Distros Project

The eleventh JavaOne has started and there's big news. There's a new DLJ license for Java. With this change some of the Linux distros are going to automatically include Java SE 5 JDK, including Ubuntu, my favorite Linux distribution.

Yippee! One less thing I'll have to install afterwards.

[]

[]

( May 16 2006, 10:37:01 AM PDT ) [Listen] Permalink Comments [3]

20050522 Sunday May 22, 2005

Adding Java.net Posts to this Blog

Now that roller is allowing us to display greater than 100 entries, and because there is also now a simple way to "back up" this blog, I'm going to copy over the very first blogs I did on java.net to this blog, adjusting them to my current style.

I'll leave links to the original posts, so you can see the comments they generated.

[]

( May 22 2005, 06:44:19 AM PDT ) [Listen] Permalink Comments [2]

20050506 Friday May 06, 2005

Java Accessibility Helper v0.8

You will probably have seen that a variety of Sun web sites (for example, Sun.Com, Java.Sun.COM and our Sun blogs got a new look and brand this week.

One of the side effects of this was that any software that was waiting for release was put on hold until everyone was sure that the old functionality of the sites with the new look and feel all worked nicely together. That hold has now been lifted, and yesterday a new early-access version of the Java Accessibility Helper that I've been working on, made it out the door.

There's not a lot of new functionality in this version. We were mainly going for ease of use and for a larger audience by supporting more platforms. The following changes have been made in v0.8:

With all these changes, we hope that the Helper will reach a larger audience and allow them to test more Java applications for accessibility related problems.

[]

( May 06 2005, 11:01:30 AM PDT ) [Listen] Permalink

20050324 Thursday March 24, 2005

FindBugs

In a recent internal email James Gosling mentioned a cool Java software project called FindBugs written by Bill Pugh of the University of Maryland. FindBugs is a program which looks for bugs in Java code. Yesterday I downloaded it and tried it out on the Java Accessibility Helper, a Java application that I maintain.

Installing it basically consisted of unpacking the compressed tarball. When I ran it on the Helper I initially got the following summary:

        Summary Analysis Generated at:
        Wed, 23 Mar 2005 10:43:00 -0800

  Type Checked    Count    Bugs    Percentage
  -------------------------------------------
  Outer Classes   129      313     242.64%
  Inner Classes   256       63     24.61%
  Interfaces       35        0     0.00%
  -------------------------------------------
  Total           420      370     88.10%

  12 Packages Analyzed

Ouch! In going through the bugs found, I'm confused on exactly how it gets this number. I went and fixed up 82 different problems that it found, and then by adding up the total left in the "By Bug Type" category, I reckon there are 77 left. So that's a total of 159. I then clicked on Settings->Configure Detectors and checked all the bug types and it only found four more bugs. I need to investigate this further to find out what's going on here.

I then got curious on whether the number of bugs reported against the Helper was typical. I decided to try it on the latest version of FreeTTS, a freely available text-to-speech synthesizer, which is written by three guys who I have a great deal of respect for. Here's the results:

        Summary Analysis Generated at: 
        Thu, 24 Mar 2005 08:40:31 -0800

  Type Checked   Count   Bugs   Percentage
  ----------------------------------------
  Outer Classes  160     154    96.25%
  Inner Classes   69       9    13.04%
  Interfaces      48       0     0.00%
  ----------------------------------------
  Total          277     162    58.48%

  19 Packages Analyzed

Ah, I feel a bit better now. Even though I'm not the original author of the Helper code, I had been through it and fixed up several thing prior to the FindBugs testing. It was a little disconcerting to see FindBugs reporting so many problems, but it appears that it's good at finding bugs that the Java programmers might not know about.

To summarise, FindBugs is a great piece of software. I encourage you to run it over your Java code and see what it reports.

[]

( Mar 24 2005, 08:44:15 AM PST ) [Listen] Permalink Comments [2]

20050127 Thursday January 27, 2005

Java Pet Peeve

I'm guessing there's got to be a very good reason for this, but I can't see it. Perhaps somebody can enlighten me. I'm thinking of something here that can help novice Java users.

Hand's up all the people who, when they were first starting with Java, accidentally typed something like:

  % java SomeApp.class

when they really should have been trying to run:

  % java SomeApp

You got back an error message like:

Exception in thread "main" java.lang.NoClassDefFoundError: SomeApp/class

Now experienced Java users realise soon realise what's going on here and adjust accordingly. But what about helping novice Java users?

With just a little more effort the java program could check to see if there was a SomeApp.class file in the currently directory and then check if it was a valid class file and if so, it could return an error message like:

Exception in thread "main" java.lang.NoClassDefFoundError: SomeApp/class

Did you really mean "java SomeApp" ?

or something similar. I'd leave it to HCI people, or a flock of senior engineers or lawyers to properly define the wording.

What am I missing?

Update: After receiving some private email on this, I've filed CR #6222504 on this issue. If you are interested get yourself added to that bug's interest list.

[]

( Jan 27 2005, 07:50:24 AM PST ) [Listen] Permalink Comments [7]

20041102 Tuesday November 02, 2004

First release of Auto-bookmarking software.

I've just released the first version (0.3) of my auto-bookmarking software. You can download it from here. It is released under the LGPL license.

The files in this distribution are an attempt to automatically generate browser bookmarks from an initial set of topics, by using the Google Java API and extracting the best hit for each query.

For more information on the reasoning behind why this is considered useful, see:

      http://blogs.sun.com/richb/20040908#google_web_search_api_s
      http://blogs.sun.com/richb/20040910#initial_version_of_a_auto
      http://blogs.sun.com/richb/20040930#more_work_on_auto_generating
      http://blogs.sun.com/richb/20041008#automatic_dewey_decimal_bookmarks

Bookmarks are generated in the XML Bookmark Exchange Language (XBEL) format. For more details on this specification see:

      http://pyxml.sourceforge.net/topics/xbel/

To use the Auto-bookmarks software, you will need to download a copy of the Google developer's kit, create a Google account and obtain a licence key. For more details on this, see:

      http://www.google.com/apis/

The distribution contains various files related to generating bookmarks based on the Library of Congress Classification. For more information on LCC, see:

      http://www.loc.gov/catdir/cpso/lcco/lcco.html

In particular, the file LCC/LCC.txt is a text-based representation of the various LCC PDF files found on the above web site, and will be the input for the auto-bookmark work being done based on LCC data.

The full README for the Auto-bookmarks distribution, including instructions on how to compile and run the software, can be found here.

Suggestions for further improvement would be most welcome, plus bug reports and comments. I'm sure there will be some tweaks to get it initially working for everyone. I'm also interested in working with others to improve this. Even helping with defining the best Google searches to get the most useful top hit for each subject would be great.

You can add comments to this post for discussion, or email at <firstname>.<lastname>@sun.com

Thanks.

[]

[]

( Nov 02 2004, 07:08:59 AM PST ) [Listen] Permalink

20040930 Thursday September 30, 2004

Announcing JSDT v2.2

I'm pleased to announce the second open-source release of the Shared Data Toolkit for Java Technology. This toolkit implements a multipoint data delivery service for use in support of highly interactive, collaborative applications.

The following changes have been made to JSDT since the v2.1 release:

There are two ways to get the JSDT 2.2 distribution.

  1. As a single zipped file of the source distribution. See the "Documents & files" link on the left of the project home page. The file you want is jsdt-src-2.2.zip under jsdt/releases.
  2. From the CVS repository. See:
    https://jsdt.dev.java .net/source/browse/jsdt/
    for more details on how to do this.

Anybody interested in JSDT should become a member of java.net (if they are not already one), and then join this project.

[]

[]

( Sep 30 2004, 01:00:47 PM PDT ) [Listen] Permalink Comments [2]

20040816 Monday August 16, 2004

The Java Accessibility Helper

Time to blog about something I'm actually working on. I'm part of the Accessibility Program Office. Part of our charter is to make sure all of our products are accessible to people with disabilities. When it comes to software, our job is made a lot easier by the built-in accessibility support that is provided by Java and the GNOME Desktop.

I wrote a month or so ago that I'd taken over the maintainence of a sizeable Java application and I was starting to try to get my head around it. Well that application is the Java Accessibility Helper which was written by Jeff Dunn when he was at Sun.

As the download page says:

The Java Accessibility Helper aids developers in making their JFC-based programs accessible to users with disabilities. A report is generated that includes a prioritized list of problems and potential problems with the application being tested. For example, the Helper verifies that all input fields in an application can be reached using only the keyboard. The Helper does not require the source code for the application being tested and will work with any AWT- or Swing-based application.

The current version that's available for download is 0.6, and I'm working on the next version. A feature I've just added is to help with testing Java applets. You now provide the URL of the HTML file containing the applet information as opposed to just the path to the applet class file. This means that it will now automatically pick up the jar ARCHIVE file tag, param name/values and any of the other HTML applet tags associated with the applet, functionality that has been missing from previous JAH releases.

There is still a fair bit of work to do to make the Java Accessibility Helper as great as it could be, but as we work up to the initial 1.0 releases, some of that missing functionality will be added in.

[]

[]

( Aug 16 2004, 10:51:17 AM PDT ) [Listen] Permalink

20040806 Friday August 06, 2004

Printing a stack trace.

I find myself needing to print a stack trace at certain points within my Java application (I'm trying to debug a race condition). Now I did most of my Java programming between 1996-99 and I'm now just returning to it, so I'm hoping that there is a simple answer to this and it's common knowledge for the Java cognascenti.

I'm currently using an "old" method I wrote for generating a stack trace:

       
      public final static void
      printStack() {
          new Exception("Stack trace").printStackTrace();
      }
      

But that will print the whole stack trace. Every single frame. I'm looking for a variant where I can pass in an argument that specifies the number of frames I'd like printed. It doesn't seem to be a standard part of the language. Certainly not from looking at the JavaDoc for the Throwable class.

I'm guessing somebody has "been there, done that" in the last five years. Can anybody point me at such a beast? Thanks.

[]

( Aug 06 2004, 07:46:10 AM PDT ) [Listen] Permalink Comments [3]

20040621 Monday June 21, 2004

Java, now with builtin lint.

A couple of weeks ago, I got a chance to see Josh Bloch and Neal Rafter do one of the talks they will be giving at JavaOne this year. This was in the Auditorium at the Santa Clara campus, and was for Sun employees who might not get a chance to go to the conference sessions at JavaOne.

The talk described the new features in J2SE 1.5.0 (which is currently available in beta2).

Lots of great stuff, but something that caught my ear was that the "javac" command now has a -Xlint option that provides lint style output of your Java code.

Cool. So I tried this on JSDT, a Java collaboration toolkit that I wrote, just to see what it would pick up on. I always run lint on my C code, so it's nice to automatically have something similar for Java (yes, I know about Java lint but it's not quite the same thing).

Well first javac in J2SE 1.5 wouldn't compile my code because I was using "enum" as a variable name, and it's now a keyword in the language. That was an easy one to fix. After it successfully compiled, it started giving me lint messages. Lots of them. They boiled down to the following three types:

Nothing life threatening, but they should be easy to fixup. Thanks for adding this facility to the compiler.

[]

[]

( Jun 21 2004, 09:50:51 AM PDT ) [Listen] Permalink Comments [4]

20040615 Tuesday June 15, 2004

Adding JGroups support to JSDT

Today I checked back the changes to add a new JGroups reliable multicast support implementation for the Shared Data Toolkit for Java(TM) Technology

It was ridiculously easy. JSDT is so designed that each new multicast implementation needs to implement the com.sun.media.jsdt.multicast.Multicast interface which defines five methods. Here's what the new code looks like.

Since 1997, JSDT has has the ability to dynamically load the transport protocol (a special Java class) to use. I even have a patent for it.

Because of this approach, combined with great JGroups API documentation and demo examples and the willingness of the JGroups author Bela Ban to help answer a couple questions I had, this was a trivial job.

[]

[]

[]

( Jun 15 2004, 05:15:57 PM PDT ) [Listen] Permalink