This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dependecies in JAR file

 
Konstantinos Vasileiou
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try to build my application as a JAR file. The problem is that as I read XML files, the program uses the relevant DTD files from the local folder when executed from within Eclipse, but searches for the DTD in home\user\ when executed as a JAR from anywhere else.
Can I somehow change that, to have the DTDs just in the same folder with the JAR, no matter from where I run the program?

Thank you in advance
 
Henry Wong
author
Marshal
Pie
Posts: 21123
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess one option would be to -- get the classpath, find the jar file, and extract the location of the file. Not simple, but doable.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic