Put two files with different capitalization into one compressed archive (jar)

I have a .jar file with two files in same directory – ap.class and aP.class. I extracted and edited one of them, but neither WinRar nor 7zip will let me put it back into the archive without affecting the other file. I do not have access to any decompiled version of the jar.
How can I do this?