I am working on a library for technical indicators and am wondering if it is possible to compile the same library code for JS and JVM. This would allow me to have a single code base that could run in the browser as well as server side. Some googling has led me to believe that this is not possible but I wanted to confirm.