Monday, April 28, 2008

Demo'ing with JDeveloper

I am obviously preparing for my presentation next week at JavaOne and as part of this we are using JDeveloper to demo some concepts and examples. I have to demo regularly and here is a tip for making sure that you demo works the same way each time.

The key to this trick is to start jdeveloper with the "-su" flag. This ensures that the system* and mywork directories are created under the JDeveloper install directory. This makes things much easier when you are trying to reset the test data. (Otherwise it is written into your home directory which is a pain to tidy up)

So I create my target directory with my JDeveloper instance in it. (In this case "D:\javaOneWorking") I then run up my JDeveloper and configure the environment once I am happy I quit JDeveloper. Then you can zip or make a copy of the whole directory. Use this copy to recreate javaOneWorking when you need to practice your demo again.

Also becuase doing an unzip or xcopy can take some time, make a few copies of the directory. Then you can simply rename them into place. That way you can be sure you can restart you demo very quickly up to a few minutes before you go on stage.

Oh and just in case you find a bug, do prepare you demo a little time before hand..... :-)


Juan Camilo Ruiz said...

Just a fyi�

Gerard Davison said...


I didn't realize this was on the procribed list; I would recommend someone use it day to day.


Brian Duff said...

Ah gerard... I did send several emails over the last year to lists you're on reminding people that this was for internal use only. Sigh.

The trouble with this property is that if you set it, when we make the migration functionality better in the future (it's horribly lame just now), it won't work for you out of the box, because the new version of JDeveloper will have no idea where to find your settings.

Brian Duff said...

Incidentally, a better (and more importantly _supported_) way of doing the same thing is to set your JDEV_USER_DIR environment variable to somewhere you want to keep the settings (e.g. c:\myjdevsettings).

Gerard Davison said...


Ah yes, so many emails, so very little time. But for some reason I though -su as in the supported list when I read the note.

I would agree that either "-J-DJDEV_USER_DIR=..." or even "-J-DUSER.HOME=..." is probably more sensible.