mardi 19 juillet 2016

Java IO in Scala

I am using Scala and am trying to use Java's IO, but I cannot seem to get it to work. Here is the basis of what I have:

import java.io._
object test{
  def main(args: Array[String]){
   val writer = new PrintWriter(new File("test.txt"))
  }
}

When I try to compile this, I get the following:

Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.2.2:compile (default-sbt-compile) on project SingleTableSparkScan: wrap: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

When I remove the line that uses Java's IO, everything runs fine. Any ideas? Thanks!

Aucun commentaire:

Enregistrer un commentaire