publicclass Main { publicstaticvoid main(String[] args) throws Exception {
System.loadLibrary(args[0]); boolean hasImage = hasImage();
String instructionSet = VMRuntime.getCurrentInstructionSet(); boolean isBootClassPathOnDisk = VMRuntime.isBootClassPathOnDisk(instructionSet);
System.out.println( "Has image is " + hasImage + ", is image dex2oat enabled is "
+ isImageDex2OatEnabled() + ", is BOOTCLASSPATH on disk is "
+ isBootClassPathOnDisk + ".");
if (hasImage && !isImageDex2OatEnabled()) { thrownew Error("Image with dex2oat disabled runs with an oat file");
} elseif (!hasImage && isImageDex2OatEnabled()) { thrownew Error("Image with dex2oat enabled runs without an oat file");
} if (hasImage && !isBootClassPathOnDisk) { thrownew Error("Image with dex2oat disabled runs with an image file");
} elseif (!hasImage && isBootClassPathOnDisk) { thrownew Error("Image with dex2oat enabled runs without an image file");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.