import org.apache.tools.ant.Project
object HelloWorld {
def main(args: Array[String]) {
println("Hello, world!")
}
}
I tried to run this code using following command:
java -cp D:\tools\apache-ant-1.7.0\lib\ant.jar;D:\tools\scala-2.9.1.final\lib\scala-compiler.jar;D:\tools\scala-2.9.1.final\lib\scala-library.jar -Dscala.usejavacp=true scala.tools.nsc.MainGenericRunner D:\test\scala\ant.scala
There is following error:
D:\test\scala\ant.scala:1: error: object apache is not a member of package org
import org.apache.tools.ant.Project
^
one error found
What is wrong?
UPDATE:
As I can see it is impossible to import any org.xxx package.
The same problem with javax.xml.xxx package.
D:\test\test2.scala:2: error: object crypto is not a member of package javax.xml
import javax.xml.crypto.Data
^
one error found
Actually I cannot import anything!
D:\test\test3.scala:3: error: object test is not a member of package com
import com.test.utils.ant.taskdefs.SqlExt
^
one error found
I experimented with
scala.bat(uncommenting the echo of the final command line, see the line starting withecho "%_JAVACMD%" ...) and found that this should work: