Java without runtime?

Discussion in 'Mac Programming' started by MAXIMUM7, Nov 15, 2007.

  1. macrumors newbie

    Nov 15, 2007
    Is it possible to just write a Java program without using the Runtime behind it?

    I.E. compile it straight to Machine Code like you would a C++ program?
  2. macrumors regular

    Feb 27, 2006
    Kent, United Kingdom
    No. Java can only compile to byte-code to run on a Java VM.
  3. Moderator emeritus


    Jul 24, 2002
    There are Java bytecode->native compilers out there, but realistically why would you? Java runs more than fast enough in a decent runtime. In some cases it actually runs faster than compiled C++ (normally as the C++ is compiled to the lowest common denominator x86 and the Java gets dynamically compiled at runtime to use ALL the CPU features available).

    There is quite a list here

Share This Page