This would only confuse the starters more afterwards. It's only useful for starters, but certainly not in real world. The whole environment variable is a mistake of the Sun guys. If you use Apache Maven2 to build your artifact, you can have it automatically download as well as bundle any thirdparty dependencies and set the classpath appropriately for your artifact.ĭo not use the CLASSPATH environment variable. A better way is to bundle your JARs with your artifact and to set the metadata appropriately so that they are on your artifact's classpath. Any changes made to that file will take effect when you next login.Īs has been observed, placing JARs in the extensions folder or modifying the CLASSPATH environment variable are generally bad ideas since they can lead to dependency hell. If you want to set environment variables so that they affect your GUI applications, you can create a file named ~/.MacOSX/ist that includes your environment variables. Be aware, however, that any environment variables that you set in ~/.profile will only take effect within your Terminal session and will not affect any GUI applications.
The CLASSPATH environment variable is not set by default, however, you can set it if you so choose.
There are several methods of getting JARs to be seen by Java on Mac OS X: