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 8855217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:05:06+00:00 2026-06-14T14:05:06+00:00

I am new to Scala. Could you help me with a problem I am

  • 0

I am new to Scala. Could you help me with a problem I am having when executing a Scala class from the command line.

Executing the code below in Eclipse I get the expected result, i.e. “hello” printed 10 times. However, when I execute from the command line, using scala testArray from the directory containing the file testArray.class then I get an exception

java.lang.NoClassDefFoundError: scala/runtime/RichInt$
        at TestArray$.main(TestArray.scala:3)
        at TestArray.main(TestArray.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
...

I have a Windows XP machine, with Java 1.6 installed. The Scala bin directory is included in the PATH and the Scala directory is set as SCALA_HOME. I am using Scala 2.9.2.

The complete source:

object TestArray {
  def main(args: Array[String]): Unit = {
    var index: Int = 10

    for (index <- 0 until 10) {
      println("hello")
    }    
  }  
}
  • 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-06-14T14:05:08+00:00Added an answer on June 14, 2026 at 2:05 pm

    After checking the source executed OK in the interpreter and then compiling outside Eclipse using scalac and also executing OK I gathered the Eclipse part must be at fault. Indeed I uninstalled scala from Eclipse and reinstalled from the nightly build and now the created class executes with no problem.

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

Sidebar

Related Questions

Please can anyone help me out with this problem? This code below works perfectly
I'm new to Scala ( Scala code runner version 2.7.7.final ), and I really
I'm new to Scala... Here's the code: def ack2(m: BigInt, n: BigInt): BigInt =
Morning All, I was hoping someone could help or provide some sample code for
I'm new to Scala (from Java) and I like to develop TDD/BDD. So before
I've been looking at the new Scala 2.9 parallel collections and am hoping to
Good day, After play new todo (new scala project) -> cd todo -> play
I'm new to scala and most functional languages and I'm currently trying to factor
I am new to Scala, and I cannot seem to find this information. Currently
I'm new to Scala and don't know Java. I want to create a jar

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.