aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "jar files" Watch "jar files" New topic
Author

jar files

vaitheeswaran subramanian
Greenhorn

Joined: Jan 06, 2005
Posts: 15
i would like to add a properties file in the jar package and i want the class files in the package to access the properties file. i always get a file not found error. what is the way of implementing it.
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
Are you using Classloader.getResourceAsStream() to open the file? Since there's no actual file (it's in the JAR), you can't get to it using the normal File operations.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: jar files
 
Similar Threads
Location of Property files
How to use Properties file contents
Packaging an application
Jar files & JarOutputStream
where to keep .jar file that is called in jsp page