Why do you recommend not using the system path? Wouldn't it be just as easy to move all my classes there?
One issue with this is that different programs might need different versions of the same library, potentially leading to instability.
-
Three additional options spring to mind:
What you can also do is specify a classpath in your application jar's manifest file. This will let your application look in a relative or pre-defined directory for library jars.
Another option is to use the Jar Bundler tool (/Developer/Applications/Java Tools/Jar Bundler.app). This will turn your application jar into a Mac .app and allow you to add library jar files into the package.
A third suggestion, if you use Eclipse, is to download a tool called FatJar. This unbundles the classes from library jar files and wraps the whole lot as a single jar file (similar tools are available for other IDEs, although I have had minimal success with Jar Tool in IntelliJ).