With the leJOS NXJ tech demo you can store one program at a time and run it only once. After it's done the NXT brick powers off and you have to upload your code again if you want to make it run.
We're working on Bluetooth uploads and a menu system so you can store more than one program in flash.