This page is no longer maintained — Please continue to the home page at

Code doesn't compile on truezip 7.3.2

No replies
Joined: 2011-09-20,
User offline. Last seen 42 years 45 weeks ago.

I get a error when I try to compile this


class ScalaTree extends Application {

override protected def work(args: Array[String]): Int = { val
listfiles = if (0 >= args.length) List(".") else args.toList
listfiles.foreach(listfile => new TFile(listfile)) return 0 }

error: error while loading TFile, Missing dependency 'class
java.nio.file.Path', required by E:\m3repos\de\schlichtherle\truezip

i submited to truezip

FYI: ----------------------------------------
christian_schlichtherle added a comment - 19/Sep/11 12:12 PM -
I am just learning scala myself and I want to gradually
introduce it in TrueZIP, so I am very disappointed to discover this
issue. There are several components to it:

(1) Unfortunately, in JSE 7, was added
which returns a java.nio.file.Path.
(2) I need to override this method in
de.schlichtherle.truezip.file.TFile in order to cut the cyclic
dependency it creates like this:

public java.nio.file.Path toPath() {
throw new UnsupportedOperationException("Use a Path
constructor or method instead!");
(3) For some reason, the scala compiler seems to do eager class
loading on dependencies, which causes the error when run with a JVM <
JSE 7.

The only workaround is to compile scala code with JSE 7,
although at run time you would only need JSE 6. If you are building on
Mac OS X, you would need a beta of JSE 7 to do this.

All this is unfortunate, but I can't change (1) and I don't
want to change (2) because it would create problems, so maybe you can
turn to the scala community and make them change (3), please?

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland