This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


AddToClassPath[path1, path2, ...]
adds the specified full paths to directories and jar or zip files to the J/Link class search path.
  • To use AddToClassPath, you first need to load J/Link using Needs["JLink`"].
  • If you specify a directory, it will be searched automatically for .jar and .zip files, in addition to appropriately nested .class files, so you do not have to name .jar or .zip files explicitly.
  • Changes take effect immediately and apply only to the currently running Java runtime.
  • If you quit and restart Java, you will need to call AddToClassPath again.