Back to LanguageTool Homepage - Privacy - Imprint

Using TeaVM to run LT under JavaScript

(konsoletyper) #1


This page states that developers tried to compile LT to JavaScript using TeaVM and failed to get the working result. I want to know what kind of errors they received. Could I help to improve TeaVM in order to compile LT properly?

(Daniel Naber) #2


there's a page at TeaVM that describes the missing parts: As you can see, quite a lot is still missing. The regular expressions would be especially important for LanguageTool.


(konsoletyper) #3

Did you try to compile with the latest version built from git repository? Regexps are now available in TeaVM.

(Daniel Naber) #4

That's great - I tried with "-DarchetypeVersion=0.2.1" as documented on Is there a snapshot that can be used so I don't have to compile it myself?

(konsoletyper) #5

I don't publish snapshot versions. You can clone TeaVM repository yourself ( and build it via mvn install -DskipTests. Or you can post me your project and I'll try to compile it. Sometimes it is impossible to compile some code, but it becomes possible with some hacks.

(Daniel Naber) #6

Thanks, I'll try it later today or tomorrow.

(Daniel Naber) #7

Here's the current list of methods and classes that are still missing according to the output of "mvn package":

[ERROR] Class was not found
[ERROR] Class was not found
[ERROR] Class was not found
[ERROR] Class was not found
[ERROR] Class was not found
[ERROR] Class was not found
[ERROR] Class was not found
[ERROR] Class was not found
[ERROR] Class was not found
[ERROR] Class java.text.Normalizer$Form was not found
[ERROR] Class java.util.concurrent.ArrayBlockingQueue was not found
[ERROR] Class java.util.concurrent.atomic.AtomicInteger was not found
[ERROR] Class java.util.concurrent.ConcurrentHashMap was not found
[ERROR] Class java.util.EmptyStackException was not found
[ERROR] Class java.util.EnumMap was not found
[ERROR] Class java.util.EnumSet was not found
[ERROR] Class java.util.Properties was not found
[ERROR] Class java.util.ResourceBundle was not found
[ERROR] Class java.util.Scanner was not found
[ERROR] Class java.util.WeakHashMap was not found
[ERROR] Class was not found
[ERROR] Method java.lang.Class.getCanonicalName()Ljava/lang/String; was not found
[ERROR] Method java.lang.Class.getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor; was not found
[ERROR] Method java.lang.Class.getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; was not found
[ERROR] Method java.lang.Class.getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; was not found
[ERROR] Method java.lang.Class.getResourceAsStream(Ljava/lang/String;)Ljava/io/InputStream; was not found
[ERROR] Method java.lang.Class.getResource(Ljava/lang/String;)Ljava/net/URL; was not found
[ERROR] Method java.lang.Class.getSimpleName()Ljava/lang/String; was not found
[ERROR] Method java.lang.ClassLoader.getResourceAsStream(Ljava/lang/String;)Ljava/io/InputStream; was not found
[ERROR] Method java.lang.ClassLoader.getResources(Ljava/lang/String;)Ljava/util/Enumeration; was not found
[ERROR] Method java.lang.ClassLoader.getSystemResourceAsStream(Ljava/lang/String;)Ljava/io/InputStream; was not found
[ERROR] Method java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class; was not found
[ERROR] Method java.lang.String.toLowerCase(Ljava/util/Locale;)Ljava/lang/String; was not found
[ERROR] Method java.lang.String.toUpperCase(Ljava/util/Locale;)Ljava/lang/String; was not found
[ERROR] Method java.lang.System.getSecurityManager()Ljava/lang/SecurityManager; was not found
[ERROR] Method java.lang.Thread.getContextClassLoader()Ljava/lang/ClassLoader; was not found
[ERROR] Method java.nio.charset.Charset.isSupported(Ljava/lang/String;)Z was not found
[ERROR] Method; was not found

(konsoletyper) #8

This does not mean anything. I'd like to see full stacks. Could you send me it by email ( or send the project so that I could built it myself and see them? I could not compile GraphHopper, but when I made alternative implementations of couple of interfaces, I could get working application. Another example is libGDX, which uses several classes that are not implemented in TeaVM (and can't be implemented in browser environment at all), but it is possible to make some little hacks.