MessagePack Java 0.6.X Quick Start Guide - Installation

0.6.x version has expired MessagePack been eliminated. If you now start using MessagePack, please do not use this version. 

Here again we retain the 0.6.x version of the content is primarily for informational purposes.

Please refer to the latest version of MessagePack: https://github.com/msgpack/msgpack-java  the project source code.

MessagePack Chinese refer to the documentation: 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 of using msgpack-java. In the beginning, we will explain how to install msgpack-java, then run will be on how to use msgpack object serialization / de-serialization (serialize / deserizalize) objects.

installation

You can use the following two methods to install msgpack-java - or directly downloaded from maven jar package build.

Installing from the warehouse Maven2

MessagePack for the use of Java has been published to Maven's central repository (Maven Central Repository). You can use the following parameters to configure your project's pom.xml file.

<dependency>
     <groupId>org.msgpack</groupId>
     <artifactId>msgpack</artifactId>
     <version>${msgpack.version}</version>
</dependency>

You will need to replace $ {msgpack.version} MessagePack for the current version, you can use a specific version of you can access  http://repo1.maven.org/maven2/org/msgpack/msgpack/  in version.

Note that in version 0.6.x is only updated to the latest version 0.6.12.

Installing 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 using the above code is compiled, you will get msgpack.jar package 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 can be used in the project. Otherwise, you will receive an error NoClassDefFoundError.

 

https://www.cwiki.us/display/Serialization/QuickStart+For+MessagePack+Java+0.6.X

Guess you like

Origin www.cnblogs.com/huyuchengus/p/11307304.html