I try to run Scala under Ubuntu 12.10 , invoke scala on the command line and get the error:

java / lang / ClassNotFoundException: error in opening JAR file /usr/lib/attica_kde.so Can this be fixed?

I do not have KDE, but Unity. But after all, the idea of ​​command line utilities should be without a difference.

Update:

 java version "1.6.0_27" 

Update 2:

 myname@mycomp:~$ scala -version 

Error: JAR file /usr/lib/attica_kde.so error occurred during initialization of VM java / lang / ClassNotFoundException

That is, I am not trying to run any program, I want to run scala at least by itself, for starters.

  • And how did you set the rock? Via apt-get? do java applications work? - om-nom-nom
  • Scala - just downloaded from the official site, unzipped, put in / usr / share. That is, without apt-get. Regular Java applications work (tried a single application). - dmitry_iii
  • How do you run it? Which team? - dlarchikov
  • Just "scala". - dmitry_iii
  • environment variables configured? - KoCaTKo

2 answers 2

It turned out that it was necessary not to download the Scala archive itself from its website, but to install the "scala" package via apt-get. Then it works fine.

    Scala which is located in the system packages and installed via apt-get is usually quite old. In addition, quite often you need to have several different versions (some versions of scala are not binary compatible). In order to easily install the latest version of Scala, groovy as well as other jvm languages, build tools, as well as manage various versions, there is the sdkman tool . It allows you to install software with the ease of a package manager. Install sdkman, and launch a new version of the terminal, then you can safely install the latest version of scala.

    To find out the list of software available for installation, use the sdk list (use q to exit). To install Scala, use the following sdk install scala command, after which the latest version will be installed. Installing sbt is similar.