I have a method in a class and a jar file is created using this class. The jar file is included in the project.
How can I override this method in the application?
@Pablo Santa Cruz is right (+1): you cannot change existing code. You have to inherit existing class and override what you want in subclass.
BUT if you really want to change something in existing compiled module you can still do it using byte-code modification techniques. There are a lot of packages that can do this. A popular higher level package that implements aspect-oriented paradigm for Java AspectJ can also help.