2012-07-26 22 views
6

Ich habe nie .Net Framework verwendet und muss jemandem zeigen, dass Scala tatsächlich funktioniert .Net. Ich brauche ein "schnelles und dreckiges" .Net-Setup mit Scala, das an einem vorhandenen JVM-Scala-Code arbeitet. Ich konnte keine Schritt-für-Schritt-Anleitung dafür finden. Ich würde mich über einige Ressourcen zu diesem Thema freuen:Schritt für Schritt Anleitung, damit Scala auf .net läuft?

  1. Wie installiert man minimal. Net und welche Version, um Scala zu arbeiten.
  2. Wie installiert man die .Net-Variante von Scala und welche Version zu verwenden (bevorzugt 2.9).
  3. Wie bekomme ich Hallo Welt zu laufen.

Vielen Dank im Voraus. Plattform in Frage: Windows 7 Professional 32 Bit.

Antwort

6

Selbsterklär Datei

helloworld.scala

/* 
see https://github.com/magarciaEPFL/scaladotnet#readme 
quick test 
========== 
1. Name this file helloworld.scala and put it in c:\scala-dotnettest 
2. Download binaries from https://github.com/magarciaEPFL/scaladotnet/downloads and unpack the zipped files to the directory c:\scala-dotnet 
3. Compile with: c:\scala-dotnet\scalacompiler -d c:\scala-dotnettest -target:exe -Xassem-extdirs c:\scala-dotnet -Xassem-name helloworld.exe -Xshow-class HelloWorld helloworld.scala 
4. Copy runtime dependencies scalalib.dll, IKVM.OpenJDK.Core.dll, IKVM.OpenJDK.Util.dll and IKVM.Runtime.dll (or all IKVM*.dll) from c:\scala-dotnet to c:\scala-dotnettest 
5. run helloworld 
C:\scala-dotnettest>helloworld 
Hello World! 
*/ 
object HelloWorld extends App { 
    println("Hello World!") 
}