Compiler of Java bytecode to JavaScript

Overview

TeaVM

Maven Central Download Gitter chat Code Quality: Java Total Alerts

See documentation at the project web site.

Useful links:

Building TeaVM

Simply clone source code (git clone https://github.com/konsoletyper/teavm.git) and run maven build (mvn clean install). You can do things a little faster (mvn clean -DskipTests) or even a little more faster (mvn clean -DskipTests -Dteavm.build.all=false).

Preview builds

You may want to access new features and don't want to wait until stable release is published on Maven Central. In this case you can get latest development build from bintray. All you need is to put the following in your pom.xml:

  <repositories>
    <repository>
      <id>teavm-dev</id>
      <url>https://teavm.org/maven/repository</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>teavm-dev</id>
      <url>https://teavm.org/maven/repository</url>
    </pluginRepository>
  </pluginRepositories>

IDEA plugin is also available in preview builds. You need to add corresponding repository manually to IDEA. Open Settings -> Plugins -> Browse repositories... -> Manage repositories..., click Add button and enter https://teavm.org/idea/dev/teavmRepository.xml. Then get back to Browse repositories and pick TeaVM plugin from list.

Embedding TeaVM

If you are not satisfied with Maven, you can embed TeaVM in your program or even create your own plugin for any build tool, like Ant or Gradle. The starting point for you may be org.teavm.tooling.TeaVMTool class from teavm-tooling artifact. You may want to go deeper and use org.teavm.vm.TeaVM from teavm-core artifact, learn how TeaVMTool initializes it. To learn how to use TeaVMTool class itself, find its usages across project source code. You most likely encounter Maven and IDEA plugins.

Please, notice that these APIs for embedding are still unstable and may change between versions.

WebAssembly

WebAssembly support is in experimental status. It may lack major features available in JavaScript backend. There's no documentation yet and you should do many things by hands (like embedding generated wasm file into your page, importing JavaScript objects, etc). Look at samples/benchmark module. You should first examine pom.xml file to learn how to build wasm file from Java. Then you may want to examine index-teavm.html and index-teavm.js to learn how to embed WebAssembly into your web page.

License

TeaVM is distributed under Apache License 2.0. TeaVM does not rely on OpenJDK or code or other (L)GPL code. TeaVM has its own reimplementation of Java class library, which is either implemented from scratch or based on non-(L)GPL projects:

If you want to contribute code to implementation of Java class library, please make sure it's no based on OpenJDK or other code licensed under (L)GPL.

Feedback

More information is available at the official site: https://teavm.org.

Ask your questions by email: [email protected]. Also you can report issues on a project's issue tracker.

Comments
  • Asynchronous code generation

    Asynchronous code generation

    TeaVM should be capable of transforming of serial code to a CPS-style code on demand. When method calls an asynch code, it should be also rendered as async.

    When there is serial contract, we can't render method as async. For example, consider Element.addListener(listener). A listener is expected to call Event.stopPropagation() syncrhonously to stop event bubbling. If listener got rendered as async, this contract will be violated, as Event.stopPropagation might go to continuation. So TeaVM needs some mechanism that declares explicit border between sync and async code.

    Async code is a good opportunity to implement cooperative multitasking. TeaVM could provide threading, switching on Thread.yield or on blocking I/O operations. Simple synchronization primitives could be implemented as well.

    The most challenging thing is to deal with debugger, which is to increase its complexity.

    enhancement 
    opened by konsoletyper 43
  • Running Knockout for Java tests

    Running Knockout for Java tests

    I am converting the ko4j tests to JUnit's @RunWith. Right now I am getting an error, but the generated test-js files seem to be running OK. What shall I do to avoid the error?

      KnockoutTCKTest.loadAndParseJSONArray Class java.util.WeakHashMap was not found
        at org.teavm.junit.TeaVMTestRunner.<clinit>(TeaVMTestRunner.java:81)
        at java.lang.Class.forName(TClass.java:149)
        at java.lang.Class.forName(TClass.java:159)
        at org.netbeans.html.json.impl.JSON.initClass(JSON.java:453)
        at org.netbeans.html.json.impl.JSON.findType(JSON.java:387)
        at org.netbeans.html.json.impl.JSON.bindTo(JSON.java:396)
        at net.java.html.json.Models.bind(Models.java:83)
        at net.java.html.json.tests.JSONTest.loadAndParseJSONArray(JSONTest.java:549)
        at org.teavm.html4j.test.KnockoutTCKTest.loadAndParseJSONArray(KnockoutTCKTest.java:305)
        at org.teavm.junit.TestEntryPoint.launchTest
        at org.teavm.junit.TestEntryPoint.lambda$run$0(TestEntryPoint.java:27)
        at $$LAMBDA0$$.launch
        at org.teavm.testing.SimpleTestRunner.run(SimpleTestRunner.java:25)
        at org.teavm.junit.TestEntryPoint.run(TestEntryPoint.java:27)
    

    It looks to me that the compilation believes that the Class.forName in JSON.initClass can load TeaVMTestRunner, but that is certainly not something that happens in the actual test...

    opened by jtulach 21
  • Bug in try catch statements

    Bug in try catch statements

    I have run into a bug in the generation of a try-catch statement.

    The original java looks like:

        while(codenameOneRunning) {
                try {
                    // wait indefinetly Lock surrounds the should method to prevent serial calls from
                    // getting "lost"
                     synchronized(lock){
                         if(shouldEDTSleep()) {
                             impl.edtIdle(true);
                             lock.wait();
                             impl.edtIdle(false);
                         }
                     }
    
                    edtLoopImpl();
                } catch(Throwable err) {
                    if(!codenameOneRunning) {
                        return;
                    }
                    err.printStackTrace();
                    if(crashReporter != null) {
                        CodenameOneThread.handleException(err);
                    }
                    if(!impl.handleEDTException(err)) {
                        if(errorHandler != null) {
                            errorHandler.fireActionEvent(new ActionEvent(err,ActionEvent.Type.Exception));
                        } else {
                            Dialog.show("Error", "An internal application error occurred: " + err.toString(), "OK", null);
                        }
                    }
                }
            }
    

    The resulting Javascript is (or at least some of it is):

        case 13:
            $bb: {
                $bc: {
                    try {
                        ccu_Display_edtLoopImpl(this_0);
                        if ($rt_suspending()) {
                            break $main;
                        }
                    } catch ($e) {
                        $je = $e.$javaException;
                        if ($je && $je instanceof jl_Throwable) {
                            // err = $je;     <--- Adding this resolves this issue... but it is missing when generated
                            break $bc;
                        } else {
                            throw $e;
                        }
                    }
                    var$5 = this_0.$codenameOneRunning;
                    if (var$5 == 0) {
                        break $bb;
                    }
                    try {
                        vkb = ccu_Display_lock;
                        $ptr = 5;
                        continue $main;
                    } catch ($e) {
                        $je = $e.$javaException;
                        if ($je && $je instanceof jl_Throwable) {
                        } else {
                            throw $e;
                        }
                    }
                }
                if (this_0.$codenameOneRunning == 0) {
                    return;
                }
                jl_Throwable_printStackTrace(err);  // <------- err is undefined here
                if (this_0.$crashReporter !== null) {
                    $ptr = 11;
                    continue $main;
                }
    

    The problem is that err is undefined when it reaches this line:

    jl_Throwable_printStackTrace(err);
    

    The problem is resolved if I manually assign err = $je in the original try/catch as shown in the snippet above.

    I have created a project that demonstrates this issue at https://github.com/shannah/teavm-exception-bug-test

    The fully-built project .war file (which includes a servlet proxy for http requests -- may be necessary to reproduce issue is here

    You should be able to run this war directly in any container. Press the "Throw Exception" button to reproduce the error at runtime.

    bug 
    opened by shannah 16
  • #451: added java.time support

    #451: added java.time support

    WIP for #451

    TODOs:

    • [ ] TMath needs to be extended to support required calculation methods (at least as dummy emulation).
    • [ ] I disabled checkstyle as it is way too pick. If that is seriously a requirement, someone else need to help. Further I will and can not add copyright headers stating that the code is written by Alexey Andreev. However, I have an old Email from jodastephen that I can copy his code from https://github.com/ThreeTen/threetenbp
    • [ ] for the design I am thinking about deleting the entire format package, remove support for custom format/parse methods and hardcode ISO parsing and formatting to keep the performance and size fine for the browser. WDYT?
    opened by hohwille 14
  • java.lang.IllegalArgumentException: Node must not be null

    java.lang.IllegalArgumentException: Node must not be null

    I've actually ported minecraft to run in chrome using your tools (https://x-games.nx-eags.tk/minecraft_demo/) but I still can't pass an average of more than 40fps and I feel that using the webassembly backend would help bring that number up. The problem is I can't get it to work, the compiler produces this error:

    Caused by: java.lang.IllegalArgumentException: Node must not be null
    	at org.teavm.dependency.DependencyNode.connectWithoutChildNodes(DependencyNode.java:285)
    	at org.teavm.dependency.DependencyNode.connect(DependencyNode.java:271)
    	at org.teavm.dependency.DependencyNode.connect(DependencyNode.java:388)
    	at org.teavm.dependency.DependencyGraphBuilder$1.exit(DependencyGraphBuilder.java:261)
    	at org.teavm.model.InstructionReadVisitor.visit(InstructionReadVisitor.java:122)
    	at org.teavm.model.instructions.ExitInstruction.acceptVisitor(ExitInstruction.java:34)
    	at org.teavm.model.BasicBlock.readAllInstructions(BasicBlock.java:314)
    	at org.teavm.dependency.DependencyGraphBuilder.buildGraph(DependencyGraphBuilder.java:111)
    	at org.teavm.dependency.PreciseDependencyAnalyzer.processMethod(PreciseDependencyAnalyzer.java:35)
    	at org.teavm.dependency.DependencyAnalyzer.lambda$scheduleMethodAnalysis$8(DependencyAnalyzer.java:512)
    	at org.teavm.dependency.DependencyAnalyzer.processQueue(DependencyAnalyzer.java:670)
    	at org.teavm.dependency.DependencyAnalyzer.processDependencies(DependencyAnalyzer.java:697)
    	at org.teavm.vm.TeaVM.build(TeaVM.java:376)
    	at org.teavm.tooling.TeaVMTool.generate(TeaVMTool.java:414)
    	at org.teavm.tooling.builder.InProcessBuildStrategy.build(InProcessBuildStrategy.java:247)
    	... 98 more
    

    is there any known cause for this failure?

    I won't bother trying to upload the source yet, the whole game stripped down is still 120,000 lines of java, but if you think it's worth wading through I can make a repository

    opened by lax1dude 13
  • A few questions about the current state of affairs?

    A few questions about the current state of affairs?

    День добрый. Мы gamedev команда. Ищем замену gwt для libgdx.

    На данный момент есть два варианта

    1. teavm (https://github.com/konsoletyper/teavm/issues/new) + teavm-libgdx (https://github.com/konsoletyper/teavm-libgdx)

    2. dragome-sdk (https://github.com/dragome/dragome-sdk) + gdx-dragome-backend (https://github.com/xpenatan/gdx-dragome-backend)

    Если судить по номерам версий и первый и второй продукт находятся в стадиях беты.

    В описании обоих сравнительный анализ происходит в первую очередь с GWT. Единственный сравнительный материал который удалось найти по "teavm vs dragome" это статью двух-годичной давности https://www.mirkosertic.de/blog/2014/12/gwt-vs-dragome-vs-teavm-for-game-programming/

    Можете ли пожалуйста прокомментировать насколько актуальна информация из той статьи на данный момент, а так же что изменилось с тех пор. И возможно какие-нибудь ваши мысли на тему того что все же лучше выбрать в качестве бэкэнда для вебовской версии libgdx учитывая производительность и удобство работы и степени стабильности продукта?

    opened by nicolaichuk 13
  • Searching for a way to parse JSON Data to a Map

    Searching for a way to parse JSON Data to a Map

    Hi there

    I am searching for a convenient way to read a JSON file from a specific URL and parse it to a Map. Are there some build in functions available, or do i have to use a JSON parser such as Gson?

    Thanks in advance, Mirko

    question 
    opened by mirkosertic 13
  • teavm.org unavailable

    teavm.org unavailable

    Hi. From the russian-ukrainian war started, teavm site (and artifacts repository) became unavailable. I suppose that teavm.org is hosted in Russia (checked whois for domain). Are there any plans to move hosting to other country?

    opened by Ihromant 12
  • Method invoked where this is null

    Method invoked where this is null

    I am getting this exception from my TeaVM generated JavaScript

    Uncaught TypeError: Cannot read property '$child0' of null
        at igmutwc_TvmSlot_setChild0 (VM1580 classes.js:10015)
        at igmutwc_TvmSlot_setChild (VM1580 classes.js:10029)
        at igmusc_AbstractUiNavigationManager_navigateRecursive (VM1580 classes.js:2769)
        at igmusc_AbstractUiNavigationManager_navigateTo (VM1580 classes.js:2752)
        at igmutc_TvmNavigationManager_onLocationChange (VM1580 classes.js:2982)
        at igmutc_TvmNavigationManager_doInit (VM1580 classes.js:2925)
        at igmusc_AbstractUiNavigationManager_init (VM1580 classes.js:2745)
        at igmudt_UiDemoTvm_start (VM1580 classes.js:720)
        at igmudt_UiDemoTvm_main (VM1580 classes.js:799)
        at VM1580 classes.js:458
    

    Debugging reveals that the variable this in that class is null. In regular Java it is completely impossible that you are inside a non-static method and this is null. Seems there is a bug in Java emulation somehow. Screenshot 2020-05-03 at 15 10 55 As you can see in the debugger both $this is null and also this is undefined leading to the comparison this.child == child to fail with a null-pointer.

    opened by hohwille 12
  • java.lang.AssertionError during LoopInversion method optimization

    java.lang.AssertionError during LoopInversion method optimization

    When enabling full or advanced optimization in TeaVM 1.0.0, i am getting the following assertion error:

    [INFO] Building JavaScript file Exception in thread "main" java.lang.AssertionError at org.teavm.model.util.PhiUpdater.use(PhiUpdater.java:401) at org.teavm.model.util.PhiUpdater.renameVariables(PhiUpdater.java:226) at org.teavm.model.util.PhiUpdater.updatePhis(PhiUpdater.java:140) at org.teavm.model.optimization.LoopInversionImpl.apply(LoopInversionImpl.java:117) at org.teavm.model.optimization.LoopInversion.optimize(LoopInversion.java:24) at org.teavm.vm.TeaVM.processMethod(TeaVM.java:481) at org.teavm.vm.TeaVM.optimize(TeaVM.java:458) at org.teavm.vm.TeaVM.build(TeaVM.java:375) at org.teavm.tooling.TeaVMTool.generate(TeaVMTool.java:416) at org.teavm.maven.TeaVMCompileMojo.execute(TeaVMCompileMojo.java:105) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) I don't know what is causing this issue, as there is no further output.

    bug 
    opened by mirkosertic 12
  • Maven problem with 1.0.0-SNAPSHOT

    Maven problem with 1.0.0-SNAPSHOT

    Replaced the 0.4.3 with the new 1.0.0-SNAPSHOT, Now our application does not build anymore. Here is the problem part. Whatever it is it doesnt do this with 0.4.3.

    From Eclipse:

    Errors occurred during the build.
    Errors running builder 'TeaVM builder' on project 'x'.
    org.teavm.model.util.InstructionVariableMapper
    

    From command line:

    
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateLifecycleMappings(DefaultLifecycleExecutionPlanCalculator.java:246)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateMojoExecutions(DefaultLifecycleExecutionPlanCalculator.java:217)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:127)
        at org.apache.maven.lifecycle.internal.DefaultLifecycleExecutionPlanCalculator.calculateExecutionPlan(DefaultLifecycleExecutionPlanCalculator.java:145)
        at org.apache.maven.lifecycle.internal.builder.BuilderCommon.resolveBuildPlan(BuilderCommon.java:96)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:109)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    [ERROR] 
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
    
    opened by ghost 12
  • java.time support incomplete: LocalDate.ofInstant was not found

    java.time support incomplete: LocalDate.ofInstant was not found

    Error:

    [INFO] Running TeaVM
    [INFO] Output file built with errors
    [INFO] Classes compiled: 1666
    [INFO] Methods compiled: 11910
    [ERROR] Method java.time.LocalDate.ofInstant(Ljava/time/Instant;Ljava/time/ZoneId;)Ljava/time/LocalDate; was not found
    

    Source: https://github.com/konsoletyper/teavm/blob/master/classlib/src/main/java/org/threeten/bp/LocalDate.java

    JavaDoc: https://docs.oracle.com/javase/9/docs/api/java/time/LocalDate.html#ofInstant-java.time.Instant-java.time.ZoneId-

    OpenJDK: https://github.com/AdoptOpenJDK/openjdk-jdk12u/blob/80c9ea8c597628ead47279a393d22cd42eaae325/src/java.base/share/classes/java/time/LocalDate.java#L318

    Same also applies for other missing API methods (LocalTime.ofInstant but also more).

    opened by hohwille 0
  • Primitive class getModifiers() not public

    Primitive class getModifiers() not public

    It seems like primitive classes (boolean, int, float, etc.) aren't marked public.

    System.out.println("boolean.class is public? " + Modifier.isPublic(boolean.class.getModifiers()));
    

    This prints false in browser, true on desktop. Easy to work around, but I thought I'd mention it. :-)

    opened by reportmill 0
  • fix(sec): upgrade net.sourceforge.htmlunit:htmlunit to 2.37.0

    fix(sec): upgrade net.sourceforge.htmlunit:htmlunit to 2.37.0

    What happened?

    There are 1 security vulnerabilities found in net.sourceforge.htmlunit:htmlunit 2.18

    What did I do?

    Upgrade net.sourceforge.htmlunit:htmlunit from 2.18 to 2.37.0 for vulnerability fix

    What did you expect to happen?

    Ideally, no insecure libs should be used.

    How was this patch tested?

    Run mvn compile failed locally, couldn't complete the build process. Run mvn clean test failed locally, unit-test couldn't pass.

    The specification of the pull request

    PR Specification from OSCS

    opened by claire9910 0
  • fix(sec): upgrade org.eclipse.jetty:jetty-server to 9.4.41

    fix(sec): upgrade org.eclipse.jetty:jetty-server to 9.4.41

    What happened?

    There are 1 security vulnerabilities found in org.eclipse.jetty:jetty-server 9.4.38.v20210224

    What did I do?

    Upgrade org.eclipse.jetty:jetty-server from 9.4.38.v20210224 to 9.4.41 for vulnerability fix

    What did you expect to happen?

    Ideally, no insecure libs should be used.

    How was this patch tested?

    Run mvn compile failed locally, couldn't complete the build process. Run mvn clean test failed locally, unit-test couldn't pass.

    The specification of the pull request

    PR Specification from OSCS

    opened by claire9910 0
Releases(0.6.0)
  • 0.6.0(Sep 17, 2019)

    • Improve performance and stability of compiler
    • Reduce size of generates JavaScript
    • Support Stream API
    • Generate immediately invoked function to protect global name space from pollution
    • Don't generate runtime.js anymore, deprecate Maven and command line options related to runtime.js generation
    • Drop support of old IE browsers
    • New code server for fast incremental recompilation
    • Add possibility to start separate TeaVM process from Maven
    • Don't report compile-time error when there's possible misuse of async methods
    • Support Java 13
    • Experimental C code generator (Linux and Windows only)
    Source code(tar.gz)
    Source code(zip)
  • 0.5.1(Jul 5, 2017)

    • Fix build daemon hanging on closing IDEA
    • Add missing files from Unicode CLDR
    • Fix capacity calculation in ArrayList and StringBuilder
    • Fix bugs in source map generation and debugging support in IDEA
    • Fix errors not appearing in IDEA messages window when can't find corresponding location
    Source code(tar.gz)
    Source code(zip)
  • 0.5.0(Jun 19, 2017)

    • Drop Eclipse support, introduce IntelliJ IDEA support
    • A new metaprogramming API
    • A set of new performance optimizations (inlining, escape analysis/scalar replacement, redundant <clinit> elimination etc)
    • Support for Kotlin and Scala
    • Support html4j 1.4
    • Experimental support for WebAssembly
    • Update to the latest versions of UnicodeData, CLDR and tzdata
    • Support asynchronous <cinit> methods
    • Performance improvements and bugfixes in compiler
    Source code(tar.gz)
    Source code(zip)
  • 0.4.3(Dec 31, 2015)

  • 0.4.1(Nov 30, 2015)

  • 0.4.2(Dec 26, 2015)

    • Fix missing <clinit> call in some circumstances (see https://github.com/konsoletyper/teavm/issues/167)
    • When passing non-JS types to JSBody methods, report an error
    • Avoid inlining of JSBody when one of parameters got used more than once (for example, it can cause error with script like a.foo() + a.foo(), when foo method has side effects)
    • Reduce amount of exported JS methods
    • Implement ClassLoader.getResourceAsStream by packing specified base64-encoded resources right into produced JS file.
    Source code(tar.gz)
    Source code(zip)
  • 0.4.0(Oct 22, 2015)

    • Java 8 lambda support
    • Java 8 function package
    • Big improvements in JSO module: improved JSBody compilation, JSBody inlining, split spec, implementation and API, allow calling Java code from JSBody
    • Html4Java 1.2.3 support
    • Refactor Maven plugin
    • Scala support
    • Builds in CI
    Source code(tar.gz)
    Source code(zip)
  • 0.3.1(Jul 2, 2015)

    • Fix Class.getDeclaringClass() in minified mode.
    • Fix Logger.log with parameters.
    • Fix compiler bug when encountering annotations without @Retention.
    • Fix bug in JSO when it is applied second time.
    • Prevent generation of annotation reading code in some cases when there is no need in annotations.
    • Fix bugs in Eclipse incremental builder.

    See https://github.com/konsoletyper/teavm/issues?q=milestone%3A%22Release+0.3.1%22+is%3Aclosed

    Source code(tar.gz)
    Source code(zip)
  • 0.3.0(Jun 25, 2015)

    • Automatic async code generation
    • Multithreading support
    • @JSBody annotation that helps interacting with JavaScript code
    • Kotlin support
    • JDK APIs: java.nio, charsets, timezones, DecimalFormat, regexps, etc
    • JavaScript APIs: media, WebGL, IndexedDB
    • Improved compile-time error diagnostics API
    • slf4j support
    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Oct 19, 2014)

    • Fix improper generation of a string literal if it contains surrogate characters
    • Fix StringBuilder.substring(int,int)
    • Fix elimination of a first variable assignment if it is set both before the try/catch and inside the try/catch block
    • Fix error when creating or importing Maven project into Eclipse in Windows
    • Fix error under JDK8
    • Upgrade support of html4j to version 1.0, better support of JavaScriptBody annotation
    • Generate JavaScript in strict mode
    • In Maven archetype import TeaVM dependencies with provided scope.
    Source code(tar.gz)
    Source code(zip)
  • 0.2.0(Oct 5, 2014)

    • Debugger support
    • Source maps generation
    • Eclipse integration
    • Command line interface
    • Incremental build
    • Many new classes from Java class library
    • Bugfixes
    Source code(tar.gz)
    Source code(zip)
Owner
Alexey Andreev
Alexey Andreev
A Java API for generating .java source files.

JavaPoet JavaPoet is a Java API for generating .java source files. Source file generation can be useful when doing things such as annotation processin

Square 10k Jan 5, 2023
Numerical-methods-using-java - Source Code for 'Numerical Methods Using Java' by Haksun Li

Apress Source Code This repository accompanies Numerical Methods Using Java by Haksun Li (Apress, 2022). Download the files as a zip using the green b

Apress 5 Nov 20, 2022
A collection of source code generators for Java.

Auto A collection of source code generators for Java. Auto‽ Java is full of code that is mechanical, repetitive, typically untested and sometimes the

Google 10k Jan 9, 2023
Java 8 annotation processor and framework for deriving algebraic data types constructors, pattern-matching, folds, optics and typeclasses.

Derive4J: Java 8 annotation processor for deriving algebraic data types constructors, pattern matching and more! tl;dr Show me how to write, say, the

null 543 Nov 23, 2022
Catch common Java mistakes as compile-time errors

Error Prone Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time. public class ShortSet { public

Google 6.3k Dec 31, 2022
Write parsers for arbitrary text inputs, entirely in Java, with no preprocessing phase

Read me first The license of this project is Apache 2.0. Requires Java 7 or later. The latest versions are: development: 2.1.0-beta.3; requires Java 8

Francis Galiegue 62 Oct 13, 2022
Build parsers in Java

jparsec Builds mini parsers in pure Java. Latest version: 3.0 (requires Java 8+) News 2016-12-05 Removed references to Codehaus in copyright and packa

null 324 Dec 31, 2022
Elegant parsing in Java and Scala - lightweight, easy-to-use, powerful.

Please see https://repo1.maven.org/maven2/org/parboiled/ for download access to the artifacts https://github.com/sirthias/parboiled/wiki for all docum

Mathias 1.2k Dec 21, 2022
Kodlama.io'da verilen ödev gereği Engin Demiroğ'un düzenlediği C# ile birlikte gerçek hayatta interface ve abstract konulu yayının Java uyarlaması yapılmıştır.

GercekHayattaInterfaceVeAbstract Kodlama.io'da verilen ödev gereği Engin Demiroğ'un düzenlediği C# ile birlikte gerçek hayatta interface ve abstract k

Baran Emre Türkmen 7 May 11, 2021
Chamomile is a Java Virtual Machine class file assembler and disassembler.

Chamomile is a Java Virtual Machine class file assembler and disassembler. Installation Maven <repositories> <repository> <id>jitpack.io</

null 15 May 24, 2022
Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.

JITWatch Log analyser and visualiser for the HotSpot JIT compiler. Video introduction to JITWatch video Slides from my LJC lightning talk on JITWatch

AdoptOpenJDK 2.8k Jan 3, 2023
Log analyser / visualiser for Java HotSpot JIT compiler. Inspect inlining decisions, hot methods, bytecode, and assembly. View results in the JavaFX user interface.

JITWatch Log analyser and visualiser for the HotSpot JIT compiler. Video introduction to JITWatch video Slides from my LJC lightning talk on JITWatch

AdoptOpenJDK 2.8k Jan 3, 2023
Simple Design for Java bridge with Javascript. Also can get javascript console.log.

SDBridgeKotlin is here. If your h5 partner confused about how to deal with iOS and Android. This Demo maybe help. 最常见的问题. WebViewJavascriptBridge is n

null 25 Dec 18, 2022
There are two versions of assignments(Java or C++) for the CS143-Compiler course, this repo is my Java-version solution.

Intro There are two versions of assignments(Java or C++) for the CS143-Compiler course, this repo is my Java-version solution. Course resources: This

F4DE 3 Dec 15, 2022
A compiler built in Java that allows to translate xml format to json.

A compiler built in Java that allows to translate xml format to json. Getting Started Welcome to the VS Code Java world. Here is a guideline to help y

Víctor Andrés Rojas 1 Jan 6, 2022
Java serialization library, proto compiler, code generator

A java serialization library with built-in support for forward-backward compatibility (schema evolution) and validation. efficient, both in speed and

protostuff 1.9k Dec 23, 2022
Java Compiler for the MiniJava language

Java Compiler for the MiniJava language Setup Our project requires the following tools with the specified versions. Tool Version Java >= 14 Maven 3 Th

Lars 3 Dec 5, 2022
Java bytecode engineering toolkit

Java bytecode engineering toolkit Javassist version 3 Copyright (C) 1999-2020 by Shigeru Chiba, All rights reserved. Javassist (JAVA programming ASSIS

null 3.7k Dec 29, 2022
Mixin is a trait/mixin and bytecode weaving framework for Java using ASM

Mixin is a trait/mixin framework for Java using ASM and hooking into the runtime classloading process via a set of pluggable built-in or user-provided

SpongePowered 1.1k Jan 7, 2023