File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Trouble compiling simple website crawler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Trouble compiling simple website crawler" Watch "Trouble compiling simple website crawler" New topic

Trouble compiling simple website crawler

Frank Metzger

Joined: Aug 04, 2011
Posts: 6
I am trying to get this simple webcrawler to work. I think it prints the HTML source line by line. Currently, it doesn't print any of the statements. I hope you can help.

Here is the code:

I get pre-compile errors for the following statements: import; "Incorrect Package" and package grabHTML; "class, interface or enum expected"

I get the following errors after compiling:
java.lang.NoClassDefFoundError: grabhtml/GrabHTML
Caused by: java.lang.ClassNotFoundException: grabhtml.GrabHTML
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
Could not find the main class: grabhtml.GrabHTML. Program will exit.
Exception in thread "main" Java Result: 1

Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

The package statement needs to be before any import statements

Junilu - [How to Ask Questions] [How to Answer Questions]
I agree. Here's the link:
subject: Trouble compiling simple website crawler
It's not a secret anymore!