Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Converting Java Apps to JavaScript Using CheerpJ

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 2
    • 0
    • 137
    Comment on it

    If you want to convert Java application into JavaScript, CheerpJ might be the best tool to do so. CheerpJ melds Java and Web development. It can convert Java applications or libraries into JavaScript and here comes the best part, to do so you don’t need to download, install and configure Java environment i.e. CheerpJ doesn’t require Java installation or a plugin to work.

    CheerpJ is developed by the same developers of CheerP, which is a C++ to JavaScript Compiler and generates fully garbage-collectible and optimized JS output.

    CheerpJ is Java to JavaScript compiler which complies Java bytecode into JavaScript with 100% Java Compatibility and also supports dynamic class loading and reflections. The CheerpJ is created with the objective to helps the developer to convert the unmodified and currently existing Java application and libraries into Web application with very less efforts.

    To provide the reflection CheerpJ uses the original .jar metadata and it can be invoked on whole Java archives (.jar) or on individual class files to generates .jar.js (or .js) output also before the web development starts all the bytecodes can be removed just after when the transformation is done. and to decrease the time of downloading CheerpJ provides a tool which helps in saving time.

    In between Java and JavaScript, there is a bi-directional interoperability which allows any JavaScript library or JAVA API to invoke as a result. Also, any of the method in JAVA can be exposed to JavaScript.

     

     

    Image Courtesy: leaningtech

     

     

     

    Most important features of cheerpJ:

    • ·         Access to HMTL DOM.
    • ·         Open- source compiler based on LLVM (Low Level Virtual Machine).
    • ·         Native JavaScript memory model.
    • ·         Optimized performance and output size.
    • ·         JavaScript interoperability.

     

    CheerpJ Runtime Environment

    The CheerpJ is a full Java SE runtime environment in JavaScript which is comprised of both JS files and .jar archives. All of these CheerpJ runtime elements can be downloaded on demand dynamically by the application and helps to minimize total download size.

     CheerpJ on-the-fly compiler or CheerpJ.js is one of the components of CheerpJ. Compiled to JavaScript and written in C++, CheerpJ.js is a minimalistic Java-bytecode-to-JavaScript compiler. If there is any converted Java application that makes use of dynamic constructs such as proxy classes, it’s required to distribute CheerpJ.js alongside. Dynamic constructs like proxy classes get compiled on the fly at run time directly on the browser.

     

    Demos

    Makers of CheerpJ have provide demos to show its capabilities. Click here to view the demos.

    A restricted released has been published in July last but it is a limited release. A public release including commercial version can be expected in the last of November 2017. For more detail click here.

    Converting Java Apps to JavaScript Using CheerpJ

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: