install scala 2.10.4 plugin on scalaide - scala

I installed scalaIDE on ubuntu. as installed, it has both scala 2.11.6 and 2.10.5 build in. The version I need is 2.10.4. How do I add that version into scalaIDE?

Window -> Preferences -> Scala -> Installations
Click Add. Probably you will already have the version of scala you need in ~/.sbt/boot. Just choose, name it and click Ok.
Reference: BYOS (Bring Your Own Scala)

Related

Downgrading Scala 2.12.3 to Scala 2.10 in Eclipse Scala IDE

I currently have Scala 2.12.3 installed and wish to switch it to 2.10. How would I go about doing this in Eclipse? I could not find any guides on it.
Its in eclipse's settings -> Scala Compiler.
You can try this link,
http://scala-ide.org/blog/scala-installations.html
You can change the scala version used for any project by
right click on project->scala->set the scala installation
you will get list of scala versions supported

Cross-compiled with an incompatible version

I am using eclipse with m2eclipse-scala plugin. Currently, I get the following error message:
exampleA_2.10-2.0.1.jar of module build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page
It looks like the versions of extracted Scala and Scala IDE match. I just wanted to make sure that this is a "false-negative" as described here and can be safely turned off.
As #The Archetypal Paul suggested, it was because I was using wrong Scala library.
If you are using Scala 2.11 (check at About Scala IDE -> installation details), you can downgrade by following instruction here. It's a lot easier than uninstalling and re-installing Scala IDE as other Stackoverflow posts recommend.
I also faced the same issue->
I am trying to use casbah jar in scala to integrate with mongodb.
After analyzing the problem i found that ->
i am trying to use casbah 2.9.1 version and my scala version is 2.11.8
Root-Cause of such error is : your jar is compiled in 2.9.0 version and you are using scala 2.11.8 version
So, to resolve that i use the jar that is compiled into 2.11 scala version-
<groupId>org.mongodb</groupId>
<artifactId>casbah-core_2.11</artifactId>
<version>3.1.1</version>
I was facing similar issue in Eclipse IDE where I had built a Spark scala project in Maven. The scala version was set to 2.11.
Later, I upgraded Scala-Ide plugin in Eclipse after which my project marked below errors,
exampleA_2.10-2.0.1.jar of module build path is cross-compiled with an incompatible version of Scala (2.10.0). In case this report is mistaken, this check can be disabled in the compiler preference page
Right click project folder > scala > set scala version. Here my scala version was displayed as 2.10. I selected 2.11 and removed all the error messages.

Is there a ScalaTest Plugin for Eclipse Luna and Scala IDE Lithium?

Trying to find the ScalaTest plugin for use with Eclipse Luna and Scala IDE for Eclipse 4.0.0 (aka Lithium). Currently using Milestone 2 of the Scala IDE for Eclipse Lithium plugin.
The ScalaTest plugin used to be part of the Scala IDE for Eclipse plugin (appeared on the list and you could check the box it to install--Scala IDE for Eclipse is supposed to be an ecosystem of plugins, ScalaTest being one of them). It doesn't appear to be there any more.
It's not on the list,
When I check "Installation Details" it doesn't appear either, and
Test configurations don't appear under "Run As..."
But there is mention of Luna in the ScalaTest plugin Github site for the scalatest plugin (https://github.com/scalatest/scalatest-eclipse-plugin), which is supposed to be part of the Scala IDE for Eclipse ecosystem.
The tests run fine from the SBT command line. So I know the ScalaTest jar file is in the classpath and is of a compatible version for my project. The ScalaTest jar file appears as an external jar file in my project in Eclipse, and the tests compile in Eclipse. Other Scala IDE for Eclipse functions seem to work correctly.
System Configuration:
Eclipse Version: Luna (4.4.0),
Scala IDE for Eclipse Version: Lithium 4.0.0 Milestone 2, for Luna and Scala 2.11.1 (download site http://download.scala-ide.org/sdk/lithium/e44/scala211/dev/site)
Java Version: Java 1.8_05,
Scala Version: 2.11.1,
Build Tool: SBT 0.13.5, running under Java 1.8_05,
ScalaTest Version: scalatest_2.11-2.2.0.jar (copied into the lib directory of my project)
My Eclipse project file is generated by SBT using the eclipse SBT command, and loaded into Eclipse using the standard "Import->Existing Projects Into Workspace..." method. The build.sbt file is a single line reading scalaVersion := "2.11.1".
Is there a ScalaTest plugin for Eclipse Luna and Scala IDE for Eclipse 4.0 (Lithium)? If so, where do I go about finding it?
This is a version of the Scala IDE that works with Eclipse Luna (version 4.4).
http://download.scala-ide.org/sdk/lithium/e44/scala211/dev/site

JDK 1.8 - can't with import sbt project

I have some trouble after installing java 1.8 on Ubuntu Gnome 14.04 with Intellij Idea 13.1.
When I tried to import sbt project it throws next:
I tried to install and set up java 1.7 at .pam-environment. But it keep taking 1.8 as main configuration and throwing this warning. I solved it by completely delete 1.8 version.
Version of scala:
nazar#lelyak-desktop:~⟫ scala -version
Scala code runner version 2.10.4 -- Copyright 2002-2013, LAMP/EPFL
And sbt - 0.13.1
I wondering to know how to use sbt with JDK 1.8?
Or with let sbt to use 1.7 version when 1.8 is default.
SOLUTION:
I changed configuration at settings for sbt to custom JDK - 1.7 and sbt-launch.jar - have installed by me.
The reason for the warning/error is that in Java 8 the permanent generation was removed.
You can change settings in IntelliJ idea not to add -XX:MaxPermSize. Go to settings page and click edit next to VM Parameters.
Remove parameter called -XX:MaxPermSize.

how to use a different version of scala library with scala ide 3.0.2?

I've got the newest Scala IDE (3.0.2) and I want to compile my stuff with Scala 2.9.3. I've added that version of Scala as a Maven dependency and removed the default 2.10.0 that the IDE bundles with the new project (not my system Scala version, by the way!). The IDE then tells me Scala is not on the build path, even when I add in the jars to the build path. When I try to add a "Scala Library" through that dialogue, it doesn't give me any options and adds 2.10.0. I've gone through the project settings, and would have expected to see a "Scala version" option, but there isn't (only a "Java version" option.)
My question is this:
How do I add a different version of Scala as the Scala library in Scala IDE 3.0.2 ?
Thanks!
I asked a similar question a while back. Short answer is, you can't.
My post:
Scala-IDE 3.0: 2.9.2 -> 2.10.0