-
Notifications
You must be signed in to change notification settings - Fork 105
Add answer to exercise 8 chapter 3 #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add answer to exercise 8 chapter 3 #22
Conversation
// - In case of executing in sbt, set `fork` setting to `true` (set fork := true ). | ||
def spawn[T](block: => T): T = { | ||
val className = Ex8_EvaluationServer.getClass().getName().split((Pattern.quote("$")))(0) | ||
val lines = Process(s"scala -cp ${System.getProperty("java.class.path")} $className").lineStream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also work with the java
command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(java
is a little bit more likely to work, since JDK installations put java
to PATH
automatically, while running this through SBT does not require having Scala installed)
@axel22 Thanks for the speedy response ! |
As a way of transferring a serialized object, use a temporary file instead of sockets.
@axel22 I have modified codes, please check them. |
Add answer to exercise 8 chapter 3
LGTM - thanks!! |
Thanks for a lot of advice. I appreciate it ! |
@axel22 please check my answer.