Skip to content

Scala Scala client for kdb+

Download KxSystems/kdb/c/kx/c.java to subfolder kx and compile it.

javac kx/c.java

Create a file a.scala containing

object KxTest {
 def main(args: Array[String])
 {
      val conn=new kx.c("localhost",5001)
      println(conn k("2+2"))
      conn close
 }
}
KxTest.main(null)

Start a kdb+ process listening on port 5001, e.g.

q -p 5001

and execute the above program using

scala -cp . a.scala

and it should print 4.