Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Awesomeness

macrumors member
Original poster
Feb 12, 2009
73
0
I am making an application specifically for Macs. I use the Jar Bundler application to turn it into an application. I need this program to run as fast as possible, and if the VM can do less interpreting of the jar it will run faster, or so I've heard. If this is true, are there any programs that compiles jars that overall run faster on macs than, say, your everyday javac?
 

garethlewis2

macrumors 6502
Dec 6, 2006
277
1
Your assumptions about Java are about 8 years out of date.

javac just converts Java source code into byte-code. It doesn't do any optimisation.

java takes this bytecode as either class files or as a jar of class files and then loads this into a hotspot VM. As it runs the classes, it will constantly analyse the usage of the classes and in doing so, will make decisions about how to optimise the code. It will always do this during the run-time of the program, so what you run, will be fastest code that can possibly be shipped. If need be, it will convert the byte code into raw machine code and execute that.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.