我从未使用.Net框架,需要向某人证明Scala确实在.Net上工作.我需要使用Scala在一些现有的JVM Scala代码上进行"快速而肮脏"的.Net设置.我找不到这方面的分步指南.我会很感激这方面的一些资源:
提前致谢.有问题的平台:Windows 7专业32位.
小智 6
自我解释文件
/*
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!")
}
Run Code Online (Sandbox Code Playgroud)