This is not a repeat of Loading a Java Charset manually. I want to do the same thing, but without using META-INF. Is it possible? Is a general solution for various service types?
In this specific case, I need to process utf-7 data, using a CharsetProvider like JUTF7. In addition to adding the jar to the classpath, this requires adding a file to META-INF/services, where the file name is java.nio.charset.spi.CharsetProvider and the contents identifies jutf7. However, it is not possible to use META-INF in this case. Is there a workaround?