As we know, in order to modify the core classes of Liferay (classes which cannot be changed using hooks), we usually create EXT environment.
Since EXT is quite complex, I think creating a jar containing a modified class would be a good choice (Liferay does the same while giving patch for any bug).
Anybody can provide me the exact steps to create Liferay patch like jar.
Since Liferay 6.0 there’s only ext plugins – I find them a lot easier to handle than the old EXT environment. Which version are you using?
The “supported” way is ext, anything else that you add to the application server is most likely depending on the way your appserver loads classes: E.g. if you add jars that should be loaded before the core classes, you might need to name the jar like aaaa-something.jar on one, zzzz-something.jar on another (figuratively). Also, depending on the platform, capitalization might matter.
I believe with all the eventualities, you’ll find that ext is a bit more than just dropping a jar, but it solves a quite complex problem. My advice: Use this to your favour.
And, probably most important: Whenever there’s a possibility to change some behaviour in hooks: Do so! They’re a lot less invasive. If your ext gets changed frequently and is of considerable size, you’ll make migrations a lot harder. Keep it as minimal as possible.