Error in simple Java application

Posted by mrblah on Stack Overflow See other posts from Stack Overflow or by mrblah
Published on 2010-01-05T18:41:16Z Indexed on 2010/04/17 21:13 UTC
Read the original article Hit count: 699

Filed under:
|

Just playing around with java trying to learn it etc.

Here is my code so far, using 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());
    }
}

I am using Netbeans.

I can't seem to figure out what the problem is, why doesn't it compile?

The error:

C:\Users\mrblah\.netbeans\6.8\var\cache\executor-snippets\run.xml:45: 
Cancelled by user.
BUILD FAILED (total time: 0 seconds)

The row in the xml is:

 <translate-classpath classpath="${classpath}" targetProperty="classpath-translated" />

© Stack Overflow or respective owner

Related posts about java

Related posts about htmlunit