The quote above means that for every command you want to use JDK1.5 for you need to preface it with the path supplied. This is not a do it once then it's set operation. It's a do it every single time operation. So to compile a single Java file you would do (in Terminal)
/System/Library/Frameworks/JavaVM.framework/Versions/1.5/javac (maybe not, you probably need stuff betweeb 1.5 and javac, but I'm not on a Mac right now) filename.
It might be possible to tell XCode to use this on a project by project basis...