Skip to main content

All Questions

0 votes
0 answers
41 views

Update value printed to console

I'm attempting to update a value printed to the console in order to implement a simple REPL that supports predictive commands. So after "->" is printed to the screen using Console.print(&...
blue-sky's user avatar
  • 54k
0 votes
1 answer
489 views

Running Scala function from command line

I'm working on an exercise. I need to create a java project that can be run from the scala command line. The final output should be this: scala> int2str(6) res0: String = six scala> int2str(65) ...
PinkBubbleGoApe's user avatar
0 votes
1 answer
185 views

gradle REPL in java8 for scala development

Is there a way to retrofit java8 with a REPL in gradle similar to sbt console which automatically adds the classes of the project to the class path of the REPL? https://plugins.gradle.org/plugin/net....
Georg Heiler's user avatar
  • 17.8k
0 votes
1 answer
273 views

how to call scala REPL console from scala program?

I need embed Scala REPL functionality in my Scala Application. How can I do that ? Which Scala method/class I need to call ? I take a look at scala.tools.nsc.interpreter package but I don't see how ...
João Paraná's user avatar
1 vote
0 answers
431 views

Scala - REPL - non-ASCII characters

This question is about the Scala REPL. If I enter a non-ASCII char e.g. π, I only see ? in the REPL console. So it does not display the non-ASCII chars properly. I tried the solutions suggested ...
peter.petrov's user avatar
  • 39.5k
4 votes
0 answers
314 views

Saving all results in Scala REPL

Is there an easy way to save all the values of variables in scala REPL? There is :save command in scala but it just saves the history of commands and the next time we need to recalculate everything ...
Hassan's user avatar
  • 396
2 votes
0 answers
843 views

How to make a REPL?

I am working on the REPL for a custom programming language on the JVM. The REPL currently has the ability to read a line and convert it to an AST, using the exact same parsers and AST structures as ...
Clashsoft's user avatar
  • 11.9k
1 vote
2 answers
479 views

Why doesn't Java have a REPL? [closed]

I was wondering why Java doesn't have a REPL. Is there some technical limitation? As an aside, how do REPLs actually work, what's going on with say the Scala REPL?
jcm's user avatar
  • 5,699
59 votes
4 answers
33k views

Scala repl throws error

When I type scala on the terminal to start the repl, it throws this error scala> [init] error: error while loading AnnotatedElement, class file '/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar (java/...
ajay's user avatar
  • 9,690
2 votes
0 answers
156 views

Run Scala REPL via Java ProcessBuilder

For research reasons I want to be able to call the Scala REPL in my Java code. To do so I use Java's ProcessBuilder and call the command scala. Although the code nicely returns the welcome message of ...
JayL's user avatar
  • 574
6 votes
2 answers
3k views

Unicode Regex in Scala REPL

I want to detect words of Unicode Letters (\p{L}). Scala's REPL gives back false for the following statement, while in Java it's true (which is the right behaviour): java.util.regex.Pattern.compile("...
pvorb's user avatar
  • 7,289
1 vote
0 answers
88 views

How can I type in a class in scala and send it to a remote end?

I have an interface called CodeInterface on a remote server (running Java). What I wanna do now is to manually type-in a class implementing CodeInterface in scala REPL, send it to the remote server, ...
Bill's user avatar
  • 11
6 votes
2 answers
1k views

Techniques to add a REPL to a Java project

What techniques that people have found useful using Clojure, Scala, JRuby, build tools, etc. to retrofit a Java project with a REPL to quickly experiment? I often need to work with plain old Java ...
Bobby Norton's user avatar
  • 1,504
2 votes
2 answers
502 views

Any way to get a BeanShell (or Scala, or JRuby) REPL in a pure Java Maven2 project?

I have a Java only project using Maven2. It'd be very useful to be able to get a REPL that has access to the full classpath of the compiled application and all libraries. In SBT, this is trivial for ...
Tom Morris's user avatar
  • 3,999
27 votes
4 answers
5k views

Attach a clojure / scala repl to a running JVM

I have a java web application running under tomcat in a Sun java 6 JVM. Is there a way to attach a scala or clojure REPL to the running JVM ? Once the webapp is up and running, the context in which ...
letronje's user avatar
  • 9,148

15 30 50 per page