How many Scala REPLs can live in one JVM?

53 Views Asked by At

I have noticed that there can be two scala REPL in one JVM and you can even connect a Scala REPL remotely to a running JVM. So I was just wondering, how many REPLs can you have in one JVM, and what is it bounded by?

1

There are 1 best solutions below

0
On BEST ANSWER

It depends on how far you would like to go to achieve it. Technically I don't think there is any hard limit except for memory. Production grade application web servers (such as Tomcat) can run pretty much any code in a well-isolated environment inside single JVM (using custom ClassLoaders among other tricks). They obviously can run several copies of the same application.