Add a directory or a JAR file to this scattered archive.
The classpath that is added is considered as a plain Java CLASSPATH.
Case 1 : classpath is a directory: Let us say there is TEMP/abc directory, which has following contents:
TEMP/abc/org/myorg/a/A.class TEMP/abc/org/myorg/b/B.class TEMP/abc/com/xyz/c/C.class TEMP/abc/LocalStrings.properties TEMP/abc/image/1.png
then addClassPath(new File("TEMP", "abc") will make:
(a) The following classes available in the deployed scattered archive application:
org.myorg.a.A org.myorg.b.B com.xyz.c.C
(b) LocalStrings.properties available in the deployed scattered archive application. So, the deployed application can do ResourceBundle.getBundle("LocalStrings");
(c) image/1.png available in the deployed scattered archive application. So, the deployed application can load the image file via getClass().getClassLoader().getResource("image/1.png");
If there is any other type of file under TEMP/abc then it will also be available in the deployed scattered archive application's classloader.
Case 2: classpath is a JAR file Let us say there is TEMP/xyz.jar, then addClassPath(new File("TEMP", "xyz.jar")) will make all the classes and any random files inside TEMP/xyz.jar available in the deployed scattered archive application.
@param classpath A directory or a JAR file.
@throws NullPointerException if classpath is null
@throws IOException if the classpath is not found.