First, download the JAR package.

The urlGithub.com/netty/netty…Here I have chosen 4.1.32.. final

MVN,.github,.idea,.mvn,.github,.idea,.mvn,.github.

3. Open the project using IDEA and rebuild

The following error is reported after rebuild:

java: AssertEquals are not referenced explicitly to the methods in org.junit.Assert and in org.junit.Assert AssertEquals (java.lang.object, Java. Lang. Object) are matched

The error is that assertEquals(2L, channel.readoutbound ()) matches the method signatures assertEquals(Long, Long) and assetEquals(Object,Object). The JVM does not know which method to use. Just change it to something like this

assertEquals(2L, channel.readOutbound()); AssertEquals (java.util.option. of(2L), channel.readoutbound ());Copy the code

After that, rebuild it again.

Once compiled, you can run the code in netty-Example (circled in the figure above) for the specific case.