- Create a Scala project my-project
- Right click my-project in Package Explorer, and select Build Path -> Configure Build Path...
- Add Library: Scala Compiler
- Right click my-project in Package Explorer, and select Create Scala interpreter in my-project
- Input
scala.tools.nsc.interpreter.session.JLineHistory()
in the consoleWelcome to Scala version 2.11.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_45).
Type in expressions to have them evaluated.
Type :help for more information.
scala> scala.tools.nsc.interpreter.session.JLineHistory()
error: bad symbolic reference to <root>.jline encountered in class file 'package.class'.
Cannot access term jline in package <root>. The current classpath may be
missing a definition for <root>.jline, or package.class may have been compiled against a version that's
incompatible with the one found on the current classpath.
error: bad symbolic reference to jline.console encountered in class file 'package.class'.
Cannot access term console in value jline. The current classpath may be
missing a definition for jline.console, or package.class may have been compiled against a version that's
incompatible with the one found on the current classpath.
scala.reflect.internal.Types$TypeError: bad symbolic reference to <root>.console.history encountered in class file 'package.class'.
Cannot access term history in value <root>.console. The current classpath may be
missing a definition for <root>.console.history, or package.class may have been compiled against a version that's
incompatible with the one found on the current classpath.
at scala.reflect.internal.pickling.UnPickler$Scan.toTypeError(UnPickler.scala:693)
at scala.reflect.internal.pickling.UnPickler$Scan$LazyTypeRef.completeInternal(UnPickler.scala:722)
at scala.reflect.internal.pickling.UnPickler$Scan$LazyTypeRef.complete(UnPickler.scala:725)
at scala.reflect.internal.pickling.UnPickler$Scan$LazyTypeRef.load(UnPickler.scala:728)
at scala.reflect.internal.Symbols$Symbol.typeParams(Symbols.scala:1650)
at scala.reflect.internal.Types$NoArgsTypeRef.typeParams(Types.scala:1926)
at scala.reflect.internal.Types$NoArgsTypeRef.isHigherKinded(Types.scala:1925)
at scala.reflect.internal.transform.UnCurry$class.scala$reflect$internal$transform$UnCurry$$expandAlias(UnCurry.scala:22)
at scala.reflect.internal.transform.UnCurry$$anon$2.apply(UnCurry.scala:26)
at scala.reflect.internal.transform.UnCurry$$anon$2.apply(UnCurry.scala:24)
at scala.collection.immutable.List.loop$1(List.scala:172)
at scala.collection.immutable.List.mapConserve(List.scala:188)
at scala.reflect.internal.transform.UnCurry$$anon$1.apply(UnCurry.scala:61)
at scala.reflect.internal.transform.UnCurry$class.transformInfo(UnCurry.scala:78)
at scala.tools.nsc.transform.UnCurry.transformInfo(UnCurry.scala:47)
at scala.tools.nsc.transform.InfoTransform$Phase$$anon$1.transform(InfoTransform.scala:38)
at scala.reflect.internal.Symbols$Symbol.rawInfo(Symbols.scala:1519)
at scala.reflect.internal.Symbols$Symbol.exists(Symbols.scala:1014)
at scala.tools.nsc.backend.jvm.GenASM$JBuilder.javaName(GenASM.scala:555)
at scala.tools.nsc.backend.jvm.GenASM$JBuilder.javaType(GenASM.scala:598)
at scala.tools.nsc.backend.jvm.GenASM$JBuilder.javaType(GenASM.scala:604)
at scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genMethod(GenASM.scala:1374)
at scala.tools.nsc.backend.jvm.GenASM$JPlainBuilder.genClass(GenASM.scala:1278)
at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.emitFor$1(GenASM.scala:135)
at scala.tools.nsc.backend.jvm.GenASM$AsmPhase.run(GenASM.scala:141)
at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1557)
at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1542)
at scala.tools.nsc.Global$Run.compileSources(Global.scala:1537)
at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:391)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:807)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:766)
at scala.tools.nsc.interpreter.IMain$Request.compile$lzycompute(IMain.scala:942)
at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:937)
at scala.tools.nsc.interpreter.IMain.compile(IMain.scala:534)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:522)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:520)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:754)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:799)
at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:666)
at scala.tools.nsc.interpreter.ILoop.processLine(ILoop.scala:433)
at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:450)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply$mcZ$sp(ILoop.scala:868)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:854)
at scala.tools.nsc.interpreter.ILoop$$anonfun$process$1.apply(ILoop.scala:854)
at scala.reflect.internal.util.ScalaClassLoader$.savingContextLoader(ScalaClassLoader.scala:95)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:854)
at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:74)
at scala.tools.nsc.MainGenericRunner.run$1(MainGenericRunner.scala:87)
at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:98)
at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:103)
at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
Abandoning crashed session.
scala>
Projects created by sbteclipse with
libraryDependencies ++= Seq("jline" % "jline" % "2.12", "org.scala-lang" % "scala-compiler" % scalaVersion.value)
will throw the same NoClassDefFoundError
when debugging.
Leave a comment
I cannot reproduce the problem, on ubuntu 14.04.
One thing I noticed on the log, is that it says
One thing I noticed on the log, is that it says
Welcome to Scala version 2.11.1
. Scala IDE 3.0.4 is bundled with Scala 2.11.2. Can you provide all the versions, from the Scala > report a bug
menu in the Scala perspective?
I have upgrade Scala IDE to 3.0.4, and I can reproduce this problem.
Scala plugin version: 3.0.4.v-2_11-201407232043-c46f499
Scala compiler version: 2.11.2.v20140721-095018-73fb460c1c
Scala library version: 2.11.2.v20140721-095018-73fb460c1c
Eclipse version: 4.3.2.v20140221-1700
No file chosen
You have an empty file field. Please select or remove it.
Name | Size |
---|