Scala is a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages, enabling Java and other programmers to be more productive. Code sizes are typically reduced by a factor of two to three when compared to an equivalent Java application.
Scala is supported by major java ide, which is comprised of eclipse, IDEA and netbeans. I choose eclipse plugin because I am more familiar of it.
Steps on installing scala-eclipse plugin:
- In your eclipse, go to Help -> Install New Software.
- If you want to install the niggler build of the plugin go to this site:
choose any of the 4 update site there. I choose the For Scala 2.10 master trunk.
If you want to install the stable version of the plugin go to this site:
and choose between Scala 2.9.x support or 2.8.x support.
- If you are a maven user and want a better integration of maven for scala, you can use this update site:
If installation failed, you can download the maven-eclipse-scala plugin manually in this site: https://github.com/sonatype/m2eclipse-scala/downloads. I downloaded the 0.2.3 version. then install it locally through: go to Help -> Install New Software -> Add -> Archive then browser the downloaded maven-eclipse-scala .jar file then okey
Scala IDE is a resource eater. The default resource allocated by eclipse will not be enough to make the most of Scala IDE. You will need to tween the eclipse.ini and add this codes
launcher.XXmaxPermSize is the maximum PermGen size of the launcher
All values after -vmargs are arguments meant for the JVM, this means that the Minimun HEAP size is 256m and its maximum capacity is 1024m (defined by -Xms and -Xmx). The initial PermGenSize of the VM is 64m (-XX:PermSize). The size of the stack for each thread is 1m defined by -Xss. The last argument says the vm can do Escape Analysis that means that it will only be available on servers by means of -server properties.
You can also show Heap Status by going to Preference -> General -> Check Show heap status. With this you can manually trigger GC.