(1) I wrote a question about this issue but I think I did not state the problem correctly so I removed it. To get to the point, in my GUI application, I notice when I want to measure the running time taken by a method using System.currentTimeMillis();
, the time becomes very short and unrealistic comparing with the standard way of running jar
file via terminal or console, does Java Swing make some effects here?
(2) Since I want to keep my GUI and also solve this issue, I read about the possibility of disabling JIT, how can I write it as a piece of code in my program so when it runs, JIT is disabled during the runtime of my application only.
Thank you.