public void InitializeClass(JavaClass javaClass)
        {
            if (!javaClass.IsResolved)
            {
                throw new InvalidOperationException(string.Format("Class {0} initialization occurred before resolution!", javaClass.Name));
            }

            if (javaClass.IsInitialized)
            {
                return;
            }

            if (javaClass.SuperClass != null && !javaClass.SuperClass.IsInitialized)
            {
                InitializeClass(javaClass.SuperClass);
            }

            javaClass.IsInitialized = true;

            MethodInfo classConstructor;

            if (javaClass.TryGetClassConstructor(out classConstructor))
            {
                var exception = classInitializationEnvironment.ExecuteProgram(classConstructor);
                if (exception != null)
                {
                    //TODO: propagate ExceptionInInitializerError to JVM
                    throw new InvalidOperationException("ExceptionInInitializerError");
                }
            }
        }