From 560627bfca7b6ca4d5b3d8fcf2a00ae04b92be24 Mon Sep 17 00:00:00 2001 From: Colorize Date: Sun, 17 Nov 2019 18:12:42 +0100 Subject: [PATCH] Support for System.getenv(). This will always return that the environment variables does not exist, it is purely intended for compatibility with applications that check for optional environment variables (in those cases the TeaVM transpiler currently fails because the method does not exist). --- .../src/main/java/org/teavm/classlib/java/lang/TSystem.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classlib/src/main/java/org/teavm/classlib/java/lang/TSystem.java b/classlib/src/main/java/org/teavm/classlib/java/lang/TSystem.java index 16421a7a6..5d2d4a8f5 100644 --- a/classlib/src/main/java/org/teavm/classlib/java/lang/TSystem.java +++ b/classlib/src/main/java/org/teavm/classlib/java/lang/TSystem.java @@ -284,4 +284,8 @@ public final class TSystem extends TObject { public static String lineSeparator() { return "\n"; } + + public static String getenv(String name) { + return null; + } }