• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package not found

 
jaimin gohel
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a registration.java file in which i have imported a custom package maned "import com.brainysoftware.java.StringUtil;" but am having only class file of package "StringUtil".

so when i compile registration.java file the console shows me error of "package not found".

so what should i do to use this particular package.

my directory structure for the package is :
D:\tomcat5.0.19\webapps\myApp\WEB-INF\classes\com\brainysoftware\java\StringUtil.class
 
Sandeep Bhandari
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
where is registration.java placed?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the directory D:\tomcat5.0.19\webapps\myApp\WEB-INF\classes in your classpath when you compile?
 
jaimin gohel
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
registration.java is posted in the directory :

D:\tomcat5.0.19\webapps\myApp\src

and StringUtil.class package is placed in :

D:\tomcat5.0.19\webapps\myApp\WEB-INF\classes\com\brainysoftware\java
 
jaimin gohel
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
D:\tomcat5.0.19\webapps\myApp\WEB-INF\classes

in the above directory I put all my .class files of the application.
 
Sandeep Bhandari
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jaimin gohel:
registration.java is posted in the directory :

D:\tomcat5.0.19\webapps\myApp\src

and StringUtil.class package is placed in :

D:\tomcat5.0.19\webapps\myApp\WEB-INF\classes\com\brainysoftware\java


How come registration.java can know that it has to add WEB-INF\classes before going to com\brainysoftware\java.
As somebody said, you can use classpath
 
jaimin gohel
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank for the suggestion the issue is over now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic