それを学ぼうとするJavaなどで遊んでいるだけです。
これが、HtmlUnitを使用したこれまでの私のコードです。
package hsspider;
import com.gargoylesoftware.htmlunit.WebClient;
/**
* @author
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.println("starting ");
Spider spider = new Spider();
spider.Test();
}
}
package hsspider;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
/**
* @author
*/
public class Spider {
public void Test() throws Exception
{
final WebClient webClient = new WebClient();
final HtmlPage page = webClient.getPage("http://www.google.com");
System.out.println(page.getTitleText());
}
}
Netbeansを使用しています。
問題が何であるか理解できないようですが、なぜコンパイルされないのですか?
エラー:
C:\Users\mrblah\.netbeans\6.8\var\cache\executor-snippets\run.xml:45:
Cancelled by user.
BUILD FAILED (total time: 0 seconds)
xmlの行は次のとおりです。
<translate-classpath classpath="${classpath}" targetProperty="classpath-translated" />