• Post Reply Bookmark Topic Watch Topic
  • New Topic

Noob question on compiling my servlet  RSS feed

 
Dave Merson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey there guys, I'm a little new to servlets and have been following along with my textbook up until now, but I'm getting compilation errors when I try to compile a simple example:







Error messages (1 of 3, but all claim cannot find symbol)

src\HelloWorld.java:4: error:cannot find symbol
import java.io;

symbol: class io
location: package java




Any help would be greatly appreciated.

 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this, specifically the section on "Importing an Entire Package".
Then have a look at the import statements at the very top of your Servlet's .java file and see if you can spot the odd one out.

Oh, and by the way, welcome to JavaRanch!
 
Sean Rowlandson
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not to detract from your learning experience but you are missing a '.*' from the end of the java.io import.
It should read import java.io.*
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!