File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jar file issue

 
Patricia Samuel
Ranch Hand
Posts: 300
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Folks,

I created a runnable jar using eclipse. There are 4 classes and 2 properties file that are required in jar file. When i run main method from eclipse, all things work well. But when i try to make it a runnable jar and execute it, it throws an error stating that property file not found. But I can see it in my jar file at specified path.

Between i have used property.load method to load the properties. Is this a problem in a jar file?

Please let me know if any other information is required.

Thanks for your support.

Regards,
Patricia Samuel.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Patricia Samuel wrote:Please let me know if any other information is required.

Well, the code for accessing the property file would be awesome.
 
Rob Spoor
Sheriff
Pie
Posts: 20393
47
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And the location of the file within the JAR file.

You are using Class(Loader).getResource(AsStream), are you?
 
Patricia Samuel
Ranch Hand
Posts: 300
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rob. It works perfectly for me when i used resourcestream.

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