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

Giving file path in jar

 
Sunil Huilgol
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,
I have given a relative path of a file in my code(a remote session bean).when i deploy my jar file and run the client somehow the working direcyory changes to JBOSS_HOME/bin and whatever path i had given in my code is not considered. I have the file i want to use in the jar.So how to get access to a the file(is is an XSD file) and why does the working directory change?

Thanks in advance
 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you need to use getResourceAsStream(). You won't be able to do any File operations in JBoss because of security.

Mark
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic