Java uses Mina framework (Intellij idea)

Source: Internet
Author: User
  1. Go to the Mina website to download the binaries package and unzip it.
  2. Intellij idea in a new project, such as TCPServer.
  3. Open Project Project Struture (ctrl+shift+alt+s), select libraries on the left, click the plus sign in the middle bar, add the two directories binaries and Lib to extract the Mina Dist compressed package.
  4. Add tcpserver code to the project (you can go online and find one).
  5. When you run the program, you find the following error:

    slf4j:failed to load Class "Org.slf4j.impl.StaticLoggerBinder".
    Slf4j:defaulting to No-operation (NOP) Logger implementation, this is because the log4j and slf4j corresponding conversion packages are not added.

  6. To download the log4j and slf4j packages, unzip and add four jars of log4j-1.2-api.2.11.0, log4j-api-2.11.0, log4j-core-2.11.0 and slf4j-log4j12-1.7.25 to the project.
  7. Then run again, or will error: Error Statuslogger No log4j 2 configuration file found. Using The default configuration, this is because the config file for log4j is not joined. After placing the corresponding log4j2.xml in the SRC directory, the program will run normally.

Java uses Mina framework (Intellij idea)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.