Default catalog addition fails for invocation with relative -jar path (and absolute path on Windows) #270
Comments
|
Re When running javac, I received errors like this one:
I could avoid them by adding |
I compiled the core/XProcConfiguration.java of #271, this time without a javac complaint. |
In saxonProcessor = Version.softwareEdition.toLowerCase(); So I think you must have had the wrong branch checked out or something. But it sounds like my patch worked for you. I'll apply it and make a new release this evening. |
Ah yes, I cloned the saxon96 branch, apparently. |
Fixed in 1.1.20. |
Lines 222 and 226 in core/XProcConfiguration.java in the Saxon 9.7 branch should be:
and
respectively.
I can create a pull request but I don’t know whether this will work. In order to make it compile, I needed to change
Configuration.softwareEdition
intoVersion.softwareEdition
.But then I could add my top-level catalog as
/META-INF/catalog.xml
and it would work on Cygwin with a Windows Java using bothjava -jar $(cygpath -ma xmlcalabash-1.1.19-97.jar)
andjava -jar xmlcalabash-1.1.19-97.jar
. Yay!Otherwise, it would try to load
jar:file://xmlcalabash-1.1.19-97.jar!/META-INF/catalog.xml
for the relative path orjar:file://C:/cygwin/home/gerrit/…/xmlcalabash-1.1.19-97.jar!/META-INF/catalog.xml
for the absolute path. The first one doesn’t exist even on Linux and the second one should start with eitherjar:file:///C:/
orjar:file:/C:/
. This string fumbling can be avoided withgetClass().getResource()
which will return the correct jar: URLs in any case.The text was updated successfully, but these errors were encountered: