1. In a Java virtual machine system, a method for automated injection of Java bytecode instructions for Java load time optimization via runtime checking with upcasts, the method consisting of: generating a stack for each of a plurality of bytecodes; generating a subclass configured to keep a history of instructions that have modified the stack; statically scanning a plurality of Java classes associated with the plurality of bytecodes to locate class file configurations and bytecode patterns that cause loading of additional classes to complete a verification of each of the classes in the plurality of Java classes, the bytecode patterns including a Java exception throw, a Java exception catch, an upcast of method arguments, an upcast of method returns, an upcast of field access and a dataflow merge of different classes; rewriting the bytecodes to delay the loading of the additional classes until required at a runtime; recording modifications that have been made to the stack by the instructions; and applying the modifications to each of the bytecodes in the plurality of bytecodes.