I would like to overide the META-INF/services there, will it work without a jar?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, you can use
META-INF/serviceswithout a jar file. At least that’s what happens according to my test (Java 6).The
META-INFdirectory of all jar files and all directories in the classpath can be scanned independently, so technically such aMETA-INFfile doesn’t override the file from another jar file, but (depending on the loader mechanism) entries in one of the files (resource of one of the class loaders) may have priority over other files, so in fact you can overload entries. As you already found out, one such case isjavax.xml.datatype.FactoryFinder(I didn’t know that).