You never mentioned if your java program required the use of X (which would be helpful next time) so I will give you both ways (with and without X) to get your computer to boot straight into your java program. I do the same thing for my mythtv box.
First you want to login as normal user so your program isn't running as root. To automate this you need to:
apt-get install mingetty
vim /etc/inittab
Find the line:
1:2345:respawn:/sbin/getty 38400 tty1
And replace it with:
1:2345:respawn:/sbin/mingetty -l USERNAME tty1
(replace USERNAME with the user want to be logged in as)
Now everytime your computer boots you will be logged in as USERNAME.
If you need X to start up place the following in your ~/.profile: (if it doesn't exist create it)
Code:
if [ -z "$DISPLAY" ] && [ `tty` == /dev/tty1 ]; then
startx
fi
Otherwise place the line to run your java program in that file.
If X is being started then you need to edit your ~/.xinitrc and place the line to start your java program in that file. Now whenever you boot up you should be logged in with your java program running. HTH