PDA

View Full Version : Adding to CLASSPATH on Snow Leopard



lowprofile
October 15th, 2010, 01:50 PM
I need to add some jar's to the classpath on Mac OS X Snow Leopard to set up Xalan and Xerces (I'm working with XSLT). This is very easy on the PC, but I am completely lost on this Macbook. I want the variable set permanently and I don't want to overwrite anything currently in CLASSPATH. Id the CLASSPATH set with anything in it already? Is there a config file in the Java folders that I edit to change it or something? Thanks, your help is quite appreciated!

artov
October 16th, 2010, 02:32 PM
If you are using Java from Terminal, you might like to edit .profile file on you home directory (or .zprofile, if your shell is zsh like I have) and add line


export CLASSPATH=$CLASSPATH:/location/of/xalan.jar:/location/of/xerces.jar

to it.