i have make one jar file called GetOfferSoftware in that jar i have Main class called Offer and this Offer class contain follo
In order to use classes and methods from another jar
1) You need to include them in the classpath. In essence you add them as libraries/references.
See: Adding Classes to the JAR File's Classpath
2) The method in question needs to have the appropriate modifiers related to visibility, e.g. to not be protected or private.
See: Controlling Access to Members of a Class
--A)If the method is protected: your own jar/.class must have the same package declaration.
--B)If the method is static
you can directly call it.
3) If the method is not static
you need to create a new Object of the class the method is declared in, and call it.
See: Java: when to use static methods
Object whatever = new MyClass();
whatever.getOffer(paramsGoHere);
See also:
how to include libraries in java without using an IDE
Adding External JARs to Eclipse Buildpath
Adding Classes to the JAR File's Classpath (via command line)