Naji - unless you already have some files in java and want them in javascript... I would recommend just writing the scripts you need in javascript. Emscripten doesn't work perfectly and tracking down bugs is a pain. Also, you have to spend alot of time familiarizing yourself to the way the results are outputed. Also, I have no clue if it works on java to javascript.
TLDR - it probably isn't worth your time, unless you have a file that = box2d in complexity and need a performance boost.