Reputation: 1776
I created a new gradle java project on Intellij IDEA and wanted to test performance. I can't find the switch from debug to release.
I know on Android this exists but android uses ART to compile things ahead of time so debugging makes sense.
What about pure java desktop applications? How can I run a gradle java application in release mode?
Upvotes: 1
Views: 270
Reputation: 4380
There are compiler flags to add debug information to the bytecode, so stack traces can have line numbers, for example. The code is no different though. The debug flags for the JVM are all about configuring it to accept connections to a debugging interface. There is a -Xdebug flag, but in recent JVMs it doesn't do anything.
There are flags you can tweak to make the just-in-time compiler more or less aggressive. If you are asking because you want the best performance, there are plenty of runtime flags to tweak, but not much for compile time that I am aware of.
Upvotes: 1