Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating jar file with properties file

 
vinod chemmi
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Experts,

I am working on eclipse core java projects. I tried to export the project as jar but it is not reading the properties file. ClassNotFound exceptions are generating. My problem is it project contains one folder conf and one file conf.properties. I am reading this file from one of class file. In eclipse i added the conf directory to build path. But jar file fails.

please help me.

regards,
vinod
 
amit punekar
Ranch Hand
Posts: 544
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,
Please check here, it might help you.

Regards,
Amit
 
vinod chemmi
Ranch Hand
Posts: 35
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amith,

I tried it, but no hope .
Still i am facing the same problems. i have added Class-Path to conf in manifest file.

regards
vinod
 
amit punekar
Ranch Hand
Posts: 544
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Just adding Class-Path will not resolve your issue. Did you go through the post and Java documentation for getResourceAsStream( If you are using this method to read the file) ? The location is goverened by the way you load the properties file.

Regds,
Amit
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic