diff --git a/classlib/src/main/java/org/teavm/classlib/java/lang/SystemNativeGenerator.java b/classlib/src/main/java/org/teavm/classlib/java/lang/SystemNativeGenerator.java index effde2a10..7189a4ab4 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/lang/SystemNativeGenerator.java +++ b/classlib/src/main/java/org/teavm/classlib/java/lang/SystemNativeGenerator.java @@ -84,6 +84,7 @@ public class SystemNativeGenerator implements Generator, DependencyPlugin { } private void generateCurrentTimeMillis(SourceWriter writer) throws IOException { + writer.append(writer.getNaming().getNameFor("java.lang.System")).append("_$callClinit();").softNewLine(); writer.append("return Long_fromNumber(new Date().getTime());").softNewLine(); }