• Post Reply Bookmark Topic Watch Topic
  • New Topic

HowTo resolve relative path to file when packaged to jar  RSS feed

 
Pete Neu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I doing some mail stuff where I have to include some
attachments. The java programm which does this is
packaged into a jar which has roughly this structure.

notify.jar
|att
| |
| foo.zip
|
|----------notification.class

So the java classes reside on the top level whereas the foo zip is in
the folder att.
When I try to get a hold on the foo.zip at runtime I always get an
exception when specifying the path like this "\\att\\foo.zip" in notfication
class.

How is this done the right way?

cheers,
Pete
[ June 20, 2006: Message edited by: Pete Neu ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!