How to build Netty 4.1 in IntelliJ for its JDK7+ dependencies?
See original GitHub issueThis is perhaps a dumb question, but how am I supposed to build Netty 4.1 in IntelliJ for its JDK7+ dependencies? If I do a fresh clone of Netty/4.1 and open it in IntelliJ, the build fails due to:
Executing pre-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Running 'before' tasks
Checking sources
Copying resources... [netty-resolver]
Copying resources... [netty-buffer]
Copying resources... [netty-common]
Copying resources... [netty-codec]
Copying resources... [netty-transport]
Copying resources... [netty-handler]
Copying resources... [netty-codec-http]
Parsing java... [netty-common]
java: Errors occurred while compiling module 'netty-common'
Checking dependencies... [netty-common]
Dependency analysis found 0 affected files
javac 11.0.10 was used to compile java sources
Finished, saving caches...
Compilation failed: errors: 48; warnings: 7
Executing post-compile tasks...
Loading Ant configuration...
Running Ant tasks...
Synchronizing output directories...
3/8/21, 8:27 PM - Build completed with 48 errors and 7 warnings in 10 sec, 766 ms
Errors like, e.g.,
.../netty/common/src/main/java/io/netty/util/internal/PlatformDependent.java:141:48
java: cannot find symbol
symbol: class ThreadLocalRandom
location: package java.util.concurrent
This is with the IntelliJ Project SDK set to JDK11 and the project language level set to 11:
I see that individual modules have their language level set lower, but I’m assuming I don’t need to manually modify all of those.
I understand that Netty conditionally checks the JDK version at runtime to determine behavior, but I’m not sure how to fix this in IntelliJ and/or Maven so that I can run unit tests and the like. I’ve been resorting to running unit tests from the command-line, which is not great for debugging.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
How to set up Netty dependency into intellij IDE - Stack Overflow
Change your IDEA config of project. Settings -> Build, Execution, Deployment -> BuildTools -> Maven. Check maven home path, user settings ...
Read more >Module dependencies | IntelliJ IDEA Documentation - JetBrains
When you compile or run your code, the list of module dependencies is used to ... Module Dependency: select another module in the...
Read more >Setting up development environment - Netty.docs
Use 64-bit operating system · Install the necessary build tools · Verify the build · Set up IntelliJ IDEA · Set up Eclipse...
Read more >I have problem with IntelliJ - java help on CodeGym
this is my the only thing that is shown after I press run all of this error is : "C:\Program Files\Java\jdk-13.0.1\bin\java.exe" ...
Read more >Netty · Delft Students on Software Architecture: DESOSA 2017
Suppliers, Libraries which Netty depends on, Java, IntelliJ ... Another instance of Netty dependency is shown by its license usage since Netty is ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve experience the same issue. Default configuration resulting in broken project is painful. I wonder if the way we are configuring the pom file (or idea) can be improved, or if this is a idea issue. seems like this will continue to impact folks re-initializing their environment IIUC.
https://www.jetbrains.com/help/idea/java-compiler.html#compiler
Mine was checked (by default). Unchecking it fixed it. I can now build and run tests in the IDE. Thanks @chrisvest!