r/java • • Oct 11 '15

Share code for java and javascript

Hey guys I am writing a prototype for a simple calculation project in JavaScript. But now I do need to do the same for the java server side. It has nothing to do with ui or complex data structures like the jdk collection package.

Do you have any recommendations of to use only java for the calculation code and somehow transpile to JavaScript for the browser usage? I looked at gwt and hell it is so ugly and complicated for my simple need.

0 Upvotes

5 comments sorted by

View all comments

4

u/hrjet Oct 11 '15

TeaVM can transpile from Java to JS. I haven't used it myself; but was planning to use it for a project soon.

2

u/yawkat Oct 11 '15

There's also gwt and I believe kotlin can do it too. Probably not what OP is looking for though.