I’m running Apache Cassandra on my MAC OS 10.9.4 and while running it I got below error in my Eclipse Console. Seems only appears on MAC OS X. No error on Windows system.
Java Version I’m running:
bash-3.2$ java -version java version "1.7.0_65" Java(TM) SE Runtime Environment (build 1.7.0_65-b17) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
No snappy-java in java.library.path” (JDK 1.7 issue?). Snappy compression doesn’t work with JDK7 on Mac OSX. It turns out this is a path bug with Snappy affecting Java 7 on OS X and it does’t part of Mac version of Java. The only solution is to have it available in your Eclipse project.
You could solve this in two different ways:
1) Download Jar: http://central.maven.org/maven2/org/xerial/snappy/snappy-java/ and include into your project class path.
2) If you have maven project just add to your maven dependancy.
<dependency> <groupId>org.xerial.snappy</groupId> <artifactId>snappy-java</artifactId> <version>1.1.1.3</version> </dependency>
There are the basic features of Snappy Library:
- JNI-based implementation to achieve comparable performance to the native C++ version.
- Although snappy-java uses JNI, it can be used safely with multiple class loaders (e.g. Tomcat, etc.).
- Supporting compression/decompression of Java primitive arrays (
float[]
,double[]
,int[]
,short[]
,long[]
, etc.) - Fast compression/decompression tailored to 64-bit CPU architecture.
- Portable across various operating systems; Snappy-java contains native libraries built for Window/Mac/Linux (64-bit). snappy-java loads one of these libraries according to your machine environment (It looks system properties,
os.name
andos.arch
).
Hope this resolves your above Snappy Java Error. Let me know for any query you have. List of all Java Tutorials.