File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to create a servlet in eclipse IDE?

 
naveen maddala
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am unable to create a servlet in eclipse IDE.But it showing the following 2 errors.

1.The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this.

2.The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files serv.java(my servletname).

i have installed JDK 1.5 and i am using eclipse 3.1 and tomcat 5.5.27 as web server.

anybody help me how to resolve this.

Regards,
Naveen.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you don't have a JDK in your project build path, or the one you have is invalid. Right click on your project, go to Properties>Java Build Path, click on the libraries tab and see what's in there. You will need a JRE SYstem Library listed. If you have one edit it and see that where it is installed is valid.
 
Vijitha Kumara
Bartender
Posts: 3908
9
Chrome Fedora Hibernate
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has nothing to do with servlet but IDE I guess.

The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this.

The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files serv.java(my servletname).


Check whether your eclipse is configured with the java installation.

 
Dawn Charangat
Ranch Hand
Posts: 249
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Naveen.,

I presume that you have java [JDK, that is] installed on your machine. If that is correct, then proceed as follows:

Open Eclipse, and in the "Window" menu;

Preferences > Java > Installed JREs

On the right hand side, click on the "Add" button, select "Standard VM", and in the resulting pane, browse and select the JDK installation directory. [I understand that the heading says "Installed JREs", but selecting a JDK here is always the better idea].

Once all this is done, try out a simple hello world program after creating a java project in eclipse, and see if that is working correctly.
This will ensure that you have a good working setup. Now, for developing servlets, you'll need the servlet-api.jar in your classpath as well. Hope that helps.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic