Shay Shmeltzer's Oracle Development Tools Tips

Running a one-time post Install task in a JDeveloper Extension

Shay Shmeltzer
Director of Product Management - Oracle

If you'll check for updates today in your JDeveloper you'll see a new extension that contains additional skins that you can use in your ADF Faces application.

The two new skins there were created by the WebCenter team as part of their new offering. And they were nice enough to share it with the community and posted links to these two zip files on their samples page.

However, I guessed that many JDeveloper users won't know about them if they just stay there, so I went ahead and created an extension that will give more exposure to the existence of these new skins.

All the extension does is download the skin files to your machine, but the part I was missing was how do I tell people where the files are and how to use them. So what I wanted to have is a help page that will pop-up and tell people where the files are once the installation finished.

Luckily, the JDeveloper extension mechanism has a post-install hook that takes care of this scenario.

All you need to do is create a new class that extend PostStartupHook (from the oracle.ide.webupdate package) and in this class implement the method install.

In my case it just calls these two lines:

final URL aboutFileURL = URLFactory.newFileURL(Ide.getHomeDirectory() + "extensions/skins/help.html");

HelpSystem.getHelpSystem().showHelp(aboutFileURL );

Then in your bundle.xml file for the extension you use the following attribute:


That's it.

If you want to learn more about building extensions for JDeveloper check the Extension SDK page

Join the discussion

Comments ( 3 )
  • bjanko Tuesday, February 20, 2007
    Hi Shay,
    nice extension,
    I noticed new skins and already tried.
    But I have experienced problem with those skins
    in FF 2.0:
    p.s. am I aloud to use those skins without webcenter licence?
  • Shay Shmeltzer Tuesday, February 20, 2007
    You can use these skins without a webcenter license.
  • Gerard Davison Friday, February 23, 2007
    The code you gave will only work if the extension if installed in the oracle home; but it will fail if installed in the users directory.
    I often do this so I don't have to reinstall extensions when I get a new build of JDeveloper.
    You can check out the source code for the jdev ant task and apsectj for a more reliable way of finding this file.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.