Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Package Error PLz help  RSS feed

 
Akhilesh Yadav
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my Directory Structure

D:\com\brainysoftware\tassie\servlet
D:\com\brainysoftware\tassie\ejb

ejb Directory consist of
BookDetails.java
BookDetailsBean.java
BookDetailsHome.java
Cart.java
CartBean.java
CartHome.java
Search.java
SearchBean.java
SearchHome.java

and Servlet Directory Consist of
AddToCartServlet.java
BookDetailsServlet.java
CheckCartServlet.java
SearchServlet.java

now the problem when ever i try to Complie any of the Servlet files it shows me follwing error

SearchServlet.java:9: package com.brainysoftware.tassie.ejb does not exist
import com.brainysoftware.tassie.ejb.Search;
^
SearchServlet.java:10: package com.brainysoftware.tassie.ejb does not exist
import com.brainysoftware.tassie.ejb.SearchHome;


plz help me out how should i complie it
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(1)Add .; in your class path.
(2)Put your Servlet in D:\ and compile.

Try this and let us know the result.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure why you asked this in the JSP forum.

There is a section in the Servlet FAQ on compiling Servlets:
http://faq.javaranch.com/view?CompilingServlets

It links to the Java In General FAQ on classpaths and javac which is very comprehensive.
You should start there.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66184
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing to do with JSP. Moved to Java in General (beginner).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!