I have a simple maven project where I have a simple class analyzing File encoding. I am using the juniversalchardet library from Google juniversalchardet library . In the pom.xml I added the dependency from link above. When I build the project with mvn clean install, everything looks fine. In the local repository I see tha universalchardet.jar file also. The class file in my project is also compiled without errors. But when I run my project .JAR i get an error like this:
Exception in thread "main" java.lang.NoClassDefFoundError: org/mozilla/universalchardet/UniversalDetector
Here is my dependency:
<dependency>
<groupId>com.googlecode.juniversalchardet</groupId>
<artifactId>juniversalchardet</artifactId>
<version>1.0.3</version>
</dependency>
I am not very familiar with Java - what I am doing wrong?