what jars are you including in your classpath ?
It looks like you're missing some google guice dependencies. I suggest to use some dependency management tool such as maven or gradle
for instance, i solved that issue by using a maven dependency to
net.sourceforge.owlapi:owlapi-osgidistribution:4.0.2
on a maven project with your Snippet class as a main class.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fake</groupId>
<artifactId>fake</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-osgidistribution</artifactId>
<version>4.0.2</version>
</dependency>
</dependencies>
If you want to run it without using a dependency manager, make sure to have the following jars in your classpath (the following list was obtained with a maven dependency tree command)
[INFO] - net.sourceforge.owlapi:owlapi-osgidistribution:jar:4.0.2:compile
[INFO] +- org.openrdf.sesame:sesame-model:jar:2.7.12:compile
[INFO] | - org.openrdf.sesame:sesame-util:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-api:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-languages:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-datatypes:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-binary:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-n3:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-nquads:jar:2.7.12:compile
[INFO] | - commons-io:commons-io:jar:2.4:compile
[INFO] +- org.openrdf.sesame:sesame-rio-ntriples:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-rdfjson:jar:2.7.12:compile
[INFO] | - com.fasterxml.jackson.core:jackson-core:jar:2.2.1:compile
[INFO] +- org.openrdf.sesame:sesame-rio-rdfxml:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-trix:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-turtle:jar:2.7.12:compile
[INFO] +- org.openrdf.sesame:sesame-rio-trig:jar:2.7.12:compile
[INFO] +- com.github.jsonld-java:jsonld-java-sesame:jar:0.5.0:compile
[INFO] | - com.github.jsonld-java:jsonld-java:jar:0.5.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.3.3:compile
[INFO] | | - com.fasterxml.jackson.core:jackson-annotations:jar:2.3.0:compile
[INFO] | +- org.apache.httpcomponents:httpclient-cache:jar:4.2.5:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.2.5:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.2.4:compile
[INFO] | | - commons-codec:commons-codec:jar:1.6:compile
[INFO] | - org.slf4j:jcl-over-slf4j:jar:1.7.7:runtime
[INFO] +- org.semarglproject:semargl-sesame:jar:0.6.1:compile
[INFO] | +- org.semarglproject:semargl-core:jar:0.6.1:compile
[INFO] | - org.semarglproject:semargl-rdfa:jar:0.6.1:compile
[INFO] | - org.semarglproject:semargl-rdf:jar:0.6.1:compile
[INFO] +- com.google.guava:guava:jar:18.0:compile
[INFO] +- com.google.inject:guice:jar:4.0-beta:compile
[INFO] | +- javax.inject:javax.inject:jar:1:compile
[INFO] | - aopalliance:aopalliance:jar:1.0:compile
[INFO] +- com.google.inject.extensions:guice-multibindings:jar:4.0-beta:compile
[INFO] +- com.google.code.findbugs:jsr305:jar:2.0.1:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.7:compile
[INFO] +- org.apache.directory.studio:org.apache.commons.io:jar:2.4:compile
[INFO] - net.sf.trove4j:trove4j:jar:3.0.3:compile
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…