There are a variety of startup files that might suit your needs. Really it depends on what your doing.
1) For most user-oriented processes, setting the set-user bit on the files permissions will suffice. In this case, you'll want to set the file as owned by root and then change its permissions to run the file as the file's owner. Like this:
%chown root theProgram
%chmod 4755 theProgram
The 4 says that anyone can execute the file and anyone doing so will do it as root. This is a potential security risk. Make sure the program can't do anything malicious. If it can, then setup a group and make it executable only by people in the group (4750).
Finally, change your .login file to execute the program at startup. cd to ~. Then type 'pico .login' and put the path and filename into the file so it looks like this:
2) For system level processes, you'll need to edit startup files. For instance, the /etc/rc file executes a bunch of commands that mount filesystems, setup virtual memory systems, etc. You can edit this to startup your own items, but only do so if you know what you are doing.
There are many of these type of files each accessed at different points in startup for different purposes. Many services and deamons are started in this fashion. You can cripple your system by editing these files, so don't do it without knowing what you're up to.
I'm not sure if this is the place to ask, but it sounds like you guys know what you're talking about. Anyhow, I'm trying to edit some scripts that will start jboss up automatically when I turn on my computer. I am also curious as to how to set a path so that when I type something like "jboss" in Terminal the program will start. I installed a script for MySQL and I've been able to get MySQL started in such a manner.