• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Unable to create a servlet in eclipse IDE?

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Vijitha Kumara
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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!
 
What's that smell? I think this tiny ad may have stepped in something.
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic