On Fri, Dec 12, 2008 at 8:19 AM, blindfold <[email protected]> wrote:
> Yes. In part for that reason I have now added runtime JIT compiler
> detection to my app

I don't know how you are trying to detect a JIT, but in case you are
using the class java.lang.Compiler or the property "java.compiler", as
far as I know neither the class nor property are commonly implemented
on any modern runtime for the Java programming language, and so I
don't expect Dalvik to ever have an implementation of those either (a
nontrivial implementation that is). I would bet, in retrospect, the
original authors — in the standard docs, java.lang.Compiler is listed as
"since 1.0" meaning that class has been around since the early 1990s
— wouldn't have chosen to make it part of the core java.lang package.

For example, I just compiled and ran the program below on my desktop
J2SE and got the output:

   java.compiler: null
   compilation attempt: false

In a modern implementation, the JIT, if it exists, operates behind the
scenes rather than being something that requires programmer
intervention.

-dan

##########

public class Comp {
   static public void main(String[] args) {
       System.out.println("java.compiler: " +
               System.getProperty("java.compiler"));
       System.out.println("compilation attempt: " +
               Compiler.compileClass(Blah.class));
   }
}

class Blah {
   static public void blort() {
   }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to