Platform specific compiling in Java?

Discussion in 'Mac Programming' started by Awesomeness, Apr 15, 2009.

  1. Awesomeness macrumors member

    Feb 12, 2009
    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?
  2. garethlewis2 macrumors 6502

    Dec 6, 2006
    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.
  3. Awesomeness thread starter macrumors member

    Feb 12, 2009

    I just searched on the internet, so I guess the page was out of date.

Share This Page