kitodo / kitodo-ugh

Kitodo.UGH Library
2 stars 10 forks source link

Used JARs trigger Bad path warning #17

Closed claussni closed 9 years ago

claussni commented 9 years ago
[javac] warning: [path] bad path element "/.../goobi-ugh/ugh/lib/iText-toolbox.jar": no such file or directory
[javac] warning: [path] bad path element "/.../goobi-ugh/ugh/lib/iText-toolbox-2.1.5.jar": no such file or directory
[javac] warning: [path] bad path element "/.../goobi-ugh/ugh/lib/bcmail-jdk14-138.jar": no such file or directory
[javac] warning: [path] bad path element "/.../goobi-ugh/ugh/lib/bcprov-jdk14-138.jar": no such file or directory

To remove this, we need to track down the troubled JARs and modify them: http://stackoverflow.com/questions/1344202/bad-path-warning-where-is-it-coming-from

henning-gerhardt commented 9 years ago

Using

for i in *.jar; do echo $i; jar xf $i; grep -i 'class-path' ./META-INF/MANIFEST.MF; done

inside lib directory prints only for file iText-2.1.5.jar a needed class path correction

henning-gerhardt commented 9 years ago

Alternate fix is adding -Xlint:-path to compiler directive. Advantage of this is: no modifying of jar files. Disadvantage is deprecated and uncheck won't be checked anymore.

Edit: Adding

<compilerarg value="-Xlint:-path" />

as separate entry remove this warning. With this second compiler argument checks for deprecated and unchecked are not removed.

claussni commented 9 years ago

+1 for adding the -Xlint:-path option. Better not to touch any old JAR there...