Tuesday Dec 27, 2005

Start writing apps for Tivo in NetBeans; updates for HME 1.4

I gave my wife a Tivo box Christmas. And I got a new toy to play with....

One of the first things I did was look for how to hac... create applications for... it. And there was a ton of resources about it.

Some of the folks associated with NetBeans have an article about developing Tivo application using NetBeans. Unfortunately, it seems like the Tivo HME team is a bit more liberal about API evolution than the NetBeans team.

I had to use the following code to create the app that Tim Boudreau blogged back in February, 2005.

    package tivotest;
    import com.tivo.hme.sdk.Application;
    import com.tivo.hme.interfaces.IContext;
    import com.tivo.hme.sim.Simulator;
    import java.awt.Color;
    public class Main extends Application {
        public static void main(String[] args) {
            try {
                Simulator.main(new String[] {Main.class.getName()});
            } catch (Exception ex) {
                System.out.println("I don't know what to do!!!");
         public void init(IContext context) {
                Color.white, "Hello from an application!"));

The bigggest changes between Tim's code and this:

  1. import of IContext.
  2. catch the Exception in main().
  3. use of getRoot() instead of a direct reference to root (which became a private member of Application).

Java Web Start fast and easy...

I wrote my entry about creating a Java Web Start-able application client, without really knowing much about Java Web Start. So, I read through the white paper that Eduardo cited on The Aquarium to learn more about it.

After I read through the paper, I realized how much work NetBeans 5 and the GlassFish Project's is doing for the developer...

  • Package the app in a jar...Covered
  • Deploying a JWS App... Covered
  • Setting up the Web Server... Covered
  • Creating the JNLP File... Covered
  • Placing the Application on the Web Server... Covered
  • Creating the Web Page... Almost
None of these things are hard. But they add up and distract developers.

Then I got to thinking, does an application client need to access resources from the server? The answer is no. It might, but doesn't have to. That means that a developer could create a "plain old java application", wrap it up in an Enterprise Application and let the GlassFish Project's deployment mechanism do the tedious housekeepinng. Their app would be JWS enabled with hardly any effort.


Thursday Dec 22, 2005

See the Java Console on Mac OS X

While trying out GlassFish Project's Java EE 5 implementation on Mac OS X 10.4, I ran into hiccup with application clients.

I soon discovered that other folks had hit the same issue, and some hints at a solution. Note: the response from the developer, tjquinn, is one of the most complete responses I have ever read in a bug report. All I needed to do was translate his response into Apple.

After some poking around, I found the 'Java Preferences' utility in /Applications/Utilities/Java/J2SE 5.0. This utility let you set the proper flags to open the Java Console.

Image of Java Preferences showing the Java Console controls
The Java Preferences interface: Java Console radio button visible

Once I set it up, I was able to see the output of batch oriented application clients that get launched by Java Web Start.

Friday Nov 11, 2005

App Server 8.1 and Ubuntu 5.10

David Coldrick had an interesting entry about Ubuntu, so I thought I would give the "Breezy Badger" release a try.

Very sweet, but with a tangy little bite that I had to resolve when it came time to install Sun Java System Application Server PE 8.1 2005Q2 UR2... I think I like the name Breezy Badger better...

I got a message that told me that I needed to get libstdc++-libc6.2-2.so.3...

Horror! I barely got Ubuntu installed and now I have to find some shared library on the great wide 'net....

I checked the release notes for SJSAS. The notes had a fix, that was for rpm's.... Then I did a little more googling and came up with an entry that looked promising.

The fix listed there did the trick.

Saturday Jul 02, 2005

Running GlassFish in Mac OS X

Disclaimer first. This information is about software that is currently under ACTIVE DEVELOPMENT. By the time you read it, it may not be accurate.

When you download a GlassFish jar-ball and try to install it on Mac OS X, you may see output that looks like this when you follow the installation instructions (ant -f setup.xml):

Failed to create database 'XXXYYYZZZ/domains/domain1/lib/databases/ejbtimer', see the next exception for details.

Basically, setup.xml exec's asasdmin to create an initial domain. One of the steps in creating the initial domain requires that asadmin start Derby, to create an ejbtimer database (as best I can tell).

Derby needs a special system property defined to execute under Mac OS X. Setup.xml and asadmin don't set the value of the property correctly. The property is derby.storage.fileSyncTransactionLog. It must have the value true.

The easiest thing to do, is edit bin/asadmin and add -Dderby.storage.fileSyncTransactionLog=true to the command that is executed.

Restarting the installation process `ant -f setup.xml` seems to execute sucessfully after that.



Vince Kraemer writes the entries in this blog.


« June 2016

No bookmarks in folder