Forums Login/signup

Unable to create a servlet in eclipse IDE?

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
I have followed almost all the steps I have seen on online comments but, my problem is not resolved yet. please help me with that. I am not able to create a dynamic web project on eclipse IDE. I need to add mysql connector externally as well.
+Pie Number of slices to send: Send
 

Shraddha Ghawalkar wrote:I have followed almost all the steps I have seen on online comments but, my problem is not resolved yet. please help me with that. I am not able to create a dynamic web project on eclipse IDE. I need to add mysql connector externally as well.



Maybe you could elaborate what error(s) you are seeing and/or other issues ?

And Welcome to the CodeRanch!

reply
reply
This thread has been viewed 5623 times.
Similar Threads
Please help, eclipse reinstalled, now can't find object class
Error while usng the JSF in the Eclipse editor
error while working with eclipse in ubuntu
StandardEmitterMBean Compile Error in Eclipse
Can not find Class File
More...

All times above are in ranch (not your local) time.
The current ranch time is
Jun 30, 2025 08:13:00.