Netty application command line startup
I moved an older Java - Netty project from a Linux server to Windows using IntelliJ. I needed to modify it and have it run on Windows. This all worked seamlessly and I've been able to run and debug from within the IDE. I'm now ready to start it via the command line, but the original Linux command line fails to work on Windows.
I did a build of artifacts, and upon examination of the jar file it appears everything is in place. MANIFEST.MF looks correct with the main class, etc. (I can tell it sees the manifest because the error message includes the correct main class name, when I attempt to execute via java -jar mystuff.jar)
When attempting to execute the jar file, I get "cannot find or load main class" error. I'm not sure what the IDE is providing behind the scenes to run the web app that I need to manually create for command line startup.
Is it possible for IntelliJ to export the runtime command line that it is using when running within the IDE?
请先登录再写评论。
So I found this reference:
https://stackoverflow.com/questions/40636790/intellij-build-wrong-jar-could-not-find-or-load-main-class
I'm bundling Bouncy Castle jar files which are signed....
You can see the command line when you start the Application Run configuration in IntelliJ IDEA.
What run/debug configuration type do you use?
See https://stackoverflow.com/a/45169655/104891.
IntelliJ IDEA cannot remove digital signatures when building the jars, so the final jar with the dependencies from the other jars that are signed will not work.