Tag: embedding
-
Designing Extendable applications using Java and Javascript in GraalVM
We have seen how GraalJS can run Javascript in the JVM. One of the main use cases for embedding Javascript is to make our application ‘extendable,’ where the application can support having the key business logic pieces evolve without changing and releasing the whole application. Let us see how to design an example project applying…
-
Running JavaScript using Nashorn in JVM
An earlier post showed how to run JavaScript using the GraalJS engine and optimize it for performance. Now, let’s see how to run Javascript using Nashorn. This helps maintain existing Java applications that use it and migrate to GraalJS if needed. If your application runs on Java 11 or earlier, Nashorn comes as part of…
-
Running GraalJS and optimizing for performance
In the previous post, we saw the need and history of embedding Javascript in a Java application. Now, let’s see how the latest GraalJS can be used for embedding Javascript in Java applications, how it performs, and how we can further optimize it for better performance – throughput specifically. GraalVM is the straightforward way to…
-
History of Embedding JavaScript in Java Applications
History is useful to learn from others’ experiences and observations. In this post, we’ll see some history and evolution of JavaScript implementation in JVM. If you search the web for “javascript in jvm”, you’ll probably see results talking about 2 projects – GraalJS and Nashorn. But, Javascript in JVM didn’t start with Nashorn. Rhino Originally,…