Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6077623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:44:31+00:00 2026-05-23T10:44:31+00:00

my scala program is using the compiler interface from scala.tools.nsc.interpreter.IMain. When I am compiling

  • 0

my scala program is using the compiler interface from scala.tools.nsc.interpreter.IMain. When I am compiling with scalac, everything works as expected. But when I compile with sbt it still compiles, but on execution it throws the following error message in the call of the interpret-method from the IMain instance:

Failed to initialize compiler: object scala not found.
** Note that as of 2.8 scala does not assume use of the java classpath.
** For the old behavior pass -usejavacp to scala, or if using a Settings
** object programatically, settings.usejavacp.value = true.

If I use settings.usejavacp.value = true on the IMain instance, I get the following exception:

java.lang.Error: typeConstructor inapplicable for <none>

My SBT project definition:

class Project(info: ProjectInfo) extends DefaultProject(info){
    val scalaSwing = "org.scala-lang" % "scala-swing" % "2.9.0"
    val scalaCompiler = "org.scala-lang" % "scala-compiler" % "2.9.0"
}

What’s wrong here? And how can I use the interpreter in a Simple Build Tool Project?

I’m using Scala 2.9.0 and Simple Build Tool 0.7.7

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:44:31+00:00Added an answer on May 23, 2026 at 10:44 am

    Take a look at the SBT wiki: http://www.scala-sbt.org/0.13/docs/Faq.html#How+do+I+use+the+Scala+interpreter+in+my+code%3F

    There’s an entry about getting the interpreter running.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I program mostly in scala and java, using scalatest in scala and junit for
I'm using the Scala plugin for IDEA and normally, it works (almost) perfectly. However,
I'm using Eclipse Scala plugin. I created a simple program: object HelloWorld { override
I wrote a program using Scala's remote actors. My first step was to create
I'm using Eclipse to program in Scala but it gives me an error when
How to solve this using scala Actors: I have a program that finds out
Please consider the following test program (using scala 2.9.0.1) object test { def main(args:Array[String])
I have a working prototype of a concurrent Scala program using Actors. I am
I tried to shrink and obfuscate my Scala/Java program using Proguard. While I was
I started to program in Scala recently. I'm looking for a free Scala profiler.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.