#923041 Scala interpreter cannot interpret files

Package:
scala
Source:
scala
Submitter:
Fabian Wolff
Date:
2026-10-29 14:03:03 UTC
Severity:
important
Tags:
#923041#5
Date:
2019-02-23 13:51:59 UTC
From:
To:
Dear maintainer,

consider the following Scala script test.scala:

  println("Hello, world!")

If I try to run

  $ scala test.scala

I get the following output:

  error: Compile server encountered fatal condition: javax/tools/DiagnosticListener
  java.lang.ClassNotFoundException: javax.tools.DiagnosticListener
  [...]

Interestingly, the call stack differs for repeated executions, so I have not included it here.

Running scala -e 'println("Hello, world!")' produces a similar error message, but executing the code manually in the REPL seems to work.

Although the exception being thrown is a different one, this is probably related to #903140. In particular, I do not have Java 8 installed, and my default Java version is 11.


Please try to have a look at this soon - ideally, this problem should be fixed before the buster freeze, because it really does impact the usability of the package...

Kind regards,
Fabian

#923041#10
Date:
2019-02-24 23:46:01 UTC
From:
To:
Thank you for reporting this issue Fabian. It seems to be a known
upstream bug. The current workaround is to run 'scala -nc test.scala'.

Emmanuel Bourg

#923041#19
Date:
2026-10-29 13:59:58 UTC
From:
To:
Tested scala 2.12.21+ds3-2 in a clean sid chroot with OpenJDK 25 and no
Java 8. "scala test.scala" (twice, the second time through the running
compile server) and scala -e 'println("Hello, world!")' both print
"Hello, world!" without -nc. Fixed upstream in
https://github.com/scala/bug/issues/10603

Juan