• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAR file behavior question  RSS feed

 
Roberto Diaz
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jar file and am listing the partial contents below:
META-INF/
META-INF/MANIFEST.MF
carblogs/
carblogs/ejb/
BlogVO.class
carblogs/ejb/Blog.class
carblogs/ejb/BlogBean.class
User.class
UserBean.class
......
As you can see some of the classes are in package carblogs and some are not in any package. I have this jar file in my class path.
If I try to reference say Blog class the code works fine. But if I try to reference UserBean class it throws an error saying "cannot resolve symbol".
Why is it so and what do I have to do to make my program recognize UserBean class, other than putting the classes in a package.
Appreciate a response.
Thanks in advance.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have to put the classes in a package. That's it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!