Java performance: optimize

I have a java application. I need to run Java in optimization mode. I run application by java -Xoptimize somejava. But when I compile it, do I need to turn optimize on? for example: java -optimize=true
Who is Participating?
ksivananthConnect With a Mentor Commented:
that is just a runtime flag, don't have to specify it while compiling!
CEHJConnect With a Mentor Commented:
Optimise is a runtime thing, so no
GenroseSusaiConnect With a Mentor Commented:
Indeed the sun java compiler does not have an optimize flag. Optimization mainly happens in the hotspot runtime.
objectsConnect With a Mentor Commented:
Java optimization is done by the vm's jit compiler (not the javac compiler), so is handled at runtime
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.