Java to Javascript Converter
Please read caveats below, seriously difficult bugs could be introduced when automatically converting code.
Java Code:
Javascript Code:
Copy JavaScript
Only Static Parts
Unit Test
Clear
Please note:
The goal is to get something close to translated, but not perfect.
The Java code must be working, this assumes that it is a functioning and correct code.
Semmantics are considered, for example s.substring is assumed to be using the substring method of string.
sprintf.js used to implement String.format.
Some Java class use may remain, and you will need to find translations to JavaScript.
Single methods are handled by wrapping the method with a class, then this is removed.
Several statements are made into a method similarly.
I am a Java developer who knows enough JavaScript to cause problems, see
GitHub project
to provide feedback
Home