How to Easily Switch Class Path

I work on J2EE apps based on JBoss. I have multiple versions of JBoss. In my work, I setup the class path in IDEA 3.0 to reference the server side jar files from JBoss. But when I want to switch versions of JBoss its a pain. Ideally, I would like to be able to set up an environment variable in Win or alternatively a symbolic link in Linux, and IDEA should just be smart enough to load in all the jars based on the link/environment variable.

Any ideas ? Thanks