2

Rational.scalaファイルのコード行を中国語で次のようにコメントします。

var a = new Rational(-4,6)
var b = new Rational(3,-9)
var c = a + a * b //满足运算符的优先级别 

コマンドを実行すると:

scala Rational.scala

例外をスローします。コメントを外したり英語でコメントしたりしますが、大丈夫です!

どうやって設定しますか?

どうもありがとう

fyi:これは例外です:

java.lang.ClassNotFoundException: Main (args = , classpath = d:\DOCUME~1\LUJUNM~1\LOCALS~1\Temp\scalascript3969467400078546162.tmp;C:\Program%20Files\
Java\jdk1.6.0_20\jre\lib\resources.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\rt.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\jsse.jar;C:\Prog
ram%20Files\Java\jdk1.6.0_20\jre\lib\jce.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\charsets.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\
dnsns.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\localedata.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\sunjce_provider.jar;C:\Progra
m%20Files\Java\jdk1.6.0_20\jre\lib\ext\sunmscapi.jar;C:\Program%20Files\Java\jdk1.6.0_20\jre\lib\ext\sunpkcs11.jar;C:\SCALA-~1.FIN\bin\..\lib\jline.ja
r;C:\SCALA-~1.FIN\bin\..\lib\scala-compiler.jar;C:\SCALA-~1.FIN\bin\..\lib\scala-dbc.jar;C:\SCALA-~1.FIN\bin\..\lib\scala-library.jar;C:\SCALA-~1.FIN\
bin\..\lib\scala-swing.jar;C:\SCALA-~1.FIN\bin\..\lib\scalap.jar;C:\Program%20Files\Java\jdk1.6.0_20\bin;C:\Program%20Files\Java\jdk1.6.0_20\lib)
        at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:103)
        at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:33)
        at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:40)
        at scala.tools.nsc.ScriptRunner.scala$tools$nsc$ScriptRunner$$runCompiled(ScriptRunner.scala:171)
        at scala.tools.nsc.ScriptRunner$$anonfun$runScript$1.apply(ScriptRunner.scala:188)
        at scala.tools.nsc.ScriptRunner$$anonfun$runScript$1.apply(ScriptRunner.scala:188)
        at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply$mcZ$sp(ScriptRunner.scala:157)
        at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply(ScriptRunner.scala:131)
        at scala.tools.nsc.ScriptRunner$$anonfun$withCompiledScript$1.apply(ScriptRunner.scala:131)
        at scala.tools.nsc.util.package$.waitingForThreads(package.scala:26)
        at scala.tools.nsc.ScriptRunner.withCompiledScript(ScriptRunner.scala:130)
        at scala.tools.nsc.ScriptRunner.runScript(ScriptRunner.scala:188)
        at scala.tools.nsc.ScriptRunner.runScriptAndCatch(ScriptRunner.scala:201)
        at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:58)
        at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:80)
        at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:89)
        at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
4

1 に答える 1