所以我安装了ant并试图写一个xml文件,并试图构建我的webdriver java代码(在windows server 2003)。但我无法建造这个项目。它抛出了很多错误。这是我的构建文件
<?xml version="1.0" encoding="UTF-8"?>
<project default="run" name="title">
<target name="run" depends="compile">
</target>
<target name="compile">
<javac includeantruntime="false" srcdir="./src" destdir="staging"/>
</target>
</project>
这是我得到的构建失败的错误消息
[javac] Compiling 4 source files to G:Documents and SettingsAdministratoreworkspaceSamplestaging
[javac] G:Documents and SettingsAdministratoreworkspaceSamplesrcLogin.java:1: error: package org.openqa.selenium does not exist
[javac] import org.openqa.selenium.WebDriver;
[javac] ^
[javac] G:Documents and SettingsAdministratoreworkspaceSamplesrcLogin.java:2: error: package org.openqa.selenium.firefox does not exist
[javac] import org.openqa.selenium.firefox.FirefoxDriver;
[javac] ^
[javac] G:Documents and SettingsAdministratoreworkspaceSamplesrclib_filesLogin.java:7: error: package org.openqa.selenium does not exist
[javac] import org.openqa.selenium.By;
[javac] ^
[javac] G:Documents and SettingsAdministratoreworkspaceSamplesrclib_filesLogin.java:8: error: package org.openqa.selenium does not exist
[javac] import org.openqa.selenium.JavascriptExecutor;
[javac] ^
[javac] G:Documents and SettingsAdministratoreworkspaceSamplesrclib_filesLogin.java:9: error: package org.openqa.selenium does not exist
[javac] import org.openqa.selenium.Keys;
[javac]
谁能告诉我发生了什么事?^ 按如下所示添加类路径ref
<javac includeantruntime="false" srcdir="./src" destdir="staging"
classpathref="classpath" />
谁能告诉我发生了什么事?
包含相关类的Jar显然不在编译时类路径上。