Transpile JavaScript to Java!
Let’s reverse the trend of last few years today! Instead of continuing to transpile more and more languages into JavaScript, let’s demonstrate how to transcript any JavaScript library into Java!
Please meet Definitely Typed Java Libraries another project sponsored by the DukeScript gang. It offers more than fifteen hundred of JavaScript libraries typings and an easy way to generate the Java API bindings for any of them.
Javadoc for first few libraries is available here.
Transpiler to Java
Some people suggested that there should be a transpiler from JavaScript to Java - that isn’t easy to do. Java needs some static type information and that isn’t available when parsing JavaScript source.
However the DukeScript project hasn’t given up: there is a huge set of TypeScript typings (essentially for any JavaScript library) and converting TypeScript types into Java types is certainly possible.
That is why DukeScript project has developed a Maven Typings Plugin that everyone can use to convert a typings file to a functional Java API.
Read our tutorial to find out how easy it is to convert underscore into Java APIs: please contribute to success of Java (in a browser) by forking and contributing another library. Share with us your experience!
Thanks!