aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes creating jar file with properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "creating jar file with properties file" Watch "creating jar file with properties file" New topic
Author

creating jar file with properties file

vinod chemmi
Ranch Hand

Joined: Jun 15, 2009
Posts: 35
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

Joined: May 14, 2004
Posts: 515
Hello there,
Please check here, it might help you.

Regards,
Amit
vinod chemmi
Ranch Hand

Joined: Jun 15, 2009
Posts: 35
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

Joined: May 14, 2004
Posts: 515
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
 
subject: creating jar file with properties file