I’m using a library that has a public static method getFile() defined in the Utils class. The library uses Utils.getFile() a lot internally, but this method is not very well implemented.
I was wondering if it’s possible to somehow override Utils.getFile() so it would use my implementation instead?
No – not with pretty much copying the class and replacing it there. Otherwise, a better alternative may be +1 for Christian’s comment: Why doesn't Java allow overriding of static methods?
If it was non-static and the method wasn’t private or final, you could subclass the class, provide your own overridden method, and use that.