Download

Download the latest MINA release from Downloads Section

What's inside

After the download is complete, extract the content of tar.gz or zip file to local hard drive. The downloaded compressed file has following contents

--/mina-2.0.0
 |
 |- dist
 |- docs
 |- lib
 |- src
 |- LICENSE.txt
 |- LICENSE.jzlib.txt
 |- LICENSE.ognl.txt
 |- LICENSE.slf4j.txt
 |- LICENSE.springframework.txt
 |- NOTICE.txt

Content Details

  • dist - Contains jars for the MINA library code
  • docs - Contains API docs and Code xrefs
  • lib - Contains all needed jars for all the libraries needed for using MINA

Additional to these, the base directory has couple of license and notice files

Running First MINA Program

Well, we have downloaded the release, lets run our first MINA example, shipped with the release.

Put the following jars in the classpath

  • mina-core-2.0.0.jar
  • mina-example-2.0.0.jar
  • slf4j-api-1.5.11.jar
  • slf4j-log4j12-1.5.0.jar
  • log4j-1.2.15.jar
Logging Tip
Log4J 1.2 users: slf4j-api.jar, slf4j-log4j12.jar, and Log4J 1.2.x
Log4J 1.3 users: slf4j-api.jar, slf4j-log4j13.jar, and Log4J 1.3.x
java.util.logging users: slf4j-api.jar and slf4j-jdk14.jar
IMPORTANT: Please make sure you are using the right slf4j-*.jar that matches to your logging framework.
For instance, slf4j-log4j12.jar and log4j-1.3.x.jar can not be used together, and will malfunction.
If you don't need a logging framework you can use slf4j-nop.jar for no logging or slf4j-simple.jar for
very basic logging.

On the command prompt, issue the following command :

>java org.apache.mina.example.gettingstarted.timeserver.MinaTimeServer

This shall start the server. Now telnet and see the program in action

Issue following command to telnet

telnet 127.0.0.1 9123

Well, we have run our first MINA program. Please try other sample programs shipped with MINA as examples.