I've struggled with this too for a while and after applying the solution suggested by AstroCool my JAR file would still not read SVG files despite having the batik-transcoder and imageio-batik dependencies in the POM file.
So for anyone else struggling with this here's a little bit of an explanation on how to apply the maven-shade-plugin and its transformers and which dependencies you will need for this to work.
First of all, I used outdated dependencies since I was using the search function of IntelliJ and for some reason it found only older version of the batik-transcoder and imageio-batik by TwelveMonkeys.
So here's are the dependencies which I currently use in my project's POM file:
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-transcoder</artifactId>
<version>1.14</version>
</dependency>
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-batik</artifactId> <!-- svg -->
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-tga</artifactId>
<version>3.8.1</version>
</dependency>
Note that you can always find the latest versions for these here by using the search function: https://mvnrepository.com/
To use the maven-shade-plugin apply these to your 'plugins' section of the POM file:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
</transformers>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
Finally, if you have been making many changes and additions it would be best to clean up your project, in IntelliJ you can do this by clicking on File -> Invalidate Chaches
After that click on Build -> Rebuild project and then build your new JAR file. If you still experience problems it may be worth to create a new Artifact (if using intelliJ) after rebuilding the project.