2012-07-26 20 views
6

我从来没有使用.Net框架,并需要向某人证明Scala的确可以在.Net上工作。我需要在Scala上使用一些现有的JVM Scala代码来获得“快速和肮脏”的.Net安装。我找不到这个分步指南。我会很感激这方面的一些资源:一步一步的指导让Scala在.net上运行?

  1. 如何安装最小.Net和哪个版本让Scala工作。
  2. 如何安装Scala的.Net变体以及要使用的版本(首选为2.9)。
  3. 如何让hello world运行。

在此先感谢。 有问题的平台:Windows 7 professional 32位。

回答

6

自我解释文件

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!") 
} 
相关问题