3

I see that there is a way to integrated python into scala using jython as explained here [http://www.slideshare.net/JerryChou4/how-to-integrate-python-into-a-scala-stack-to-build-realtime-predictive-models-v2-nomanuscript ]

In java, the below code does the job

java -jar jython.jar script.py

But i have no idea on how to do this in scala. Do I need to include the jython.jar to scala?

Chris Martin
  • 30,334
  • 10
  • 78
  • 137
Edwin Vivek N
  • 564
  • 8
  • 28

1 Answers1

0

Scala compiles down to JVM bytecode just like Java does. So the way to access Scala from Jython is pretty much the same as with Java. The command line you offered would need to include any Scala .class or .jar files you needed to access from Jython but otherwise would work.

Do I need to include the jython.jar to scala?

Yes, you do.

Reid Spencer
  • 2,776
  • 28
  • 37