MessagePack Java 0.6.X Quick start Guide-installation
The 0.6.x version of MessagePack is out of date and out of date. If you start using MessagePack now, please do not use this version. We keep the content of version 0.6.x here for reference purposes.
For the latest version of MessagePack, please refer to the project source code in https://github.com/msgpack/msgpack-java.
For Chinese documentation of MessagePack, please refer to: http://docs.ossez.com/messagepack-docs/index.html
MessagePack test and sample source code: https://github.com/cwiki-us-demo/serialize-deserialize-demo-java
This guide provides a quick guide to using msgpack-java. In the beginning, we will show how to install msgpack-java, and then we will run how to use msgpack to serialize / deserialize (serialize/deserizalize) objects.
Installation
You can use the following two ways to install msgpack-java-download from maven or build the jar package directly.
Install from Maven2 repository
MessagePack's use of Java has been released to Maven's central warehouse (Maven Central Repository). You can use the following parameters to configure your project's pom.xml file.
Org.msgpack msgpack ${msgpack.version}
You need to replace ${msgpack.version} with the current version of MessagePack, and you can visit the version in http://repo1.maven.org/maven2/org/msgpack/msgpack/ for the specific version you can use.
Note that in version 0.6.x, the latest version is only updated to 0.6.12.
Install from git repository
You can get the latest code from the code repository.
$git clone git@github.com:msgpack/msgpack-java.git$ cd msgpack-java$ mvn package
After compiling with the above code, you will get the msgpack.jar package in the msgpack-java/target directory.
You also need https://code.google.com/p/json-simple/ and https://github.com/jboss-javassist/javassist to make msgpack.jar available in the project. Otherwise you will receive a NoClassDefFoundError error.
Https://www.cwiki.us/display/Serialization/QuickStart+For+MessagePack+Java+0.6.X