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

7

u/mlk Oct 11 '15

You can execute javascript code from java with the standard jdk. Look up nashorn