Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jar file is not working  RSS feed

 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there I have added a Simple Jar file in Eclipse
Proect->BuildPath->jar file

but class Inside that are not showing in My project

this is my Project Structure


and I have all ready checked in Order and Export


But jar file is not working

any help?
jar-location.PNG
[Thumbnail for jar-location.PNG]
Order-and-Export.PNG
[Thumbnail for Order-and-Export.PNG]
 
Stefan Evans
Bartender
Posts: 1837
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you click the arrow next to the jar file in your explorer and see a bunch of class files within it? If so then your jar file is added successfully. (Looks good to me from your screenshots)

Why do you think the jar file is "not working" ?
What error messages are you seeing?
How are you using these classes?
Are you importing these classes into your program?


 
Kishor Joshi
Ranch Hand
Posts: 674
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have figured out all the classes that I am trying to Import are on the default package of Jar file that why they are Not showing.I have put them in seprate package(Other than default) working fine

Thanks all
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to avoid putting classes without package names into jars because you can't import them.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!