Running a one-time post Install task in a JDeveloper Extension
By Shay Shmeltzer-Oracle on Feb 14, 2007
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");
Then in your bundle.xml file for the extension you use the following attribute:
If you want to learn more about building extensions for JDeveloper check the Extension SDK page