3rd party jar files
App.java
public class app
{
public static void main(String args[])
{
ABC a1=new ABC();
a1.m1();
}
}
First.jar
public class ABC
{
public void m1()
{
xyz x1=new xyz();
x1.m2();
}
}
Second.jar
public class xyz
{
public void m2()
{
}
}
Add classpath of first and second to the class path
- When java application uses 3rd party API, other than j2sdk API, that Api related main and dependent jar files must be added in the classpath.
- If classes of one jar file are using classes and interfaces of another jar file then other jar files are called Dependent jar files
- For example, in spring f/w s/w, Spring.jar classes are using classes and interfaces are common-logging.jar file. So common-logging.jar file is dependent jar file for spring. jar file