Próbuję odpalić programik, który był kiedyś robiony na zamówienie (ja go zleciłem), działał.
Teraz chcę znów z niego skorzystać i nie mogę.
Mam w instrukcji:
1. c:\scala\bin\scalac O:\gg.scala
2. c:\scala\bin\scala -classpath . com.leo.statgg.Main O:\kontakty.txt > out.txt
I tak robię. Jak jednak wykonuję polecenie nr 2 mimo istnienia oczywiście plików na dysku: O:\ dostaję:
C:\>c:\scala\bin\scala -classpath . com.leo.statgg.Main O:\kontakty.txt > out.tx
t
Exception in thread "main" java.io.IOError: java.lang.RuntimeException: /package
s cannot be represented as URI
at java.base/jdk.internal.jrtfs.JrtPath.toUri(JrtPath.java:175)
at scala.tools.nsc.classpath.JrtClassPath.asURLs(DirectoryClassPath.scal
a:213)
at scala.tools.nsc.classpath.AggregateClassPath.$anonfun$asURLs$1(Aggreg
ateClassPath.scala:64)
at scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.s
cala:244)
at scala.collection.Iterator.foreach(Iterator.scala:941)
at scala.collection.Iterator.foreach$(Iterator.scala:941)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
at scala.collection.IterableLike.foreach(IterableLike.scala:74)
at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
at scala.collection.TraversableLike.flatMap(TraversableLike.scala:244)
at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:241)
at scala.collection.AbstractTraversable.flatMap(Traversable.scala:108)
at scala.tools.nsc.classpath.AggregateClassPath.asURLs(AggregateClassPat
h.scala:64)
at scala.tools.util.PathResolver.resultAsURLs(PathResolver.scala:297)
at scala.tools.nsc.GenericRunnerSettings.classpathURLs$lzycompute(Generi
cRunnerSettings.scala:19)
at scala.tools.nsc.GenericRunnerSettings.classpathURLs(GenericRunnerSett
ings.scala:19)
at scala.tools.nsc.GenericRunnerCommand.guessHowToRun(GenericRunnerComma
nd.scala:43)
at scala.tools.nsc.GenericRunnerCommand.<init>(GenericRunnerCommand.scal
a:62)
at scala.tools.nsc.GenericRunnerCommand.<init>(GenericRunnerCommand.scal
a:25)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:49)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:108)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
Caused by: java.lang.RuntimeException: /packages cannot be represented as URI
... 23 more
C:\>
O co mu chodzi?...
Plik gg.scala się w ogóle nie zmienił. Ma oryginalną datę modyfikacji z 2019 r. Nawet przywróciłem go z kopii i to samo...