File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
REST with Spring (video course)
this week in the
EJB and other Java EE Technologies
Joined: Jan 06, 2005
Jan 06, 2005 10:20:00
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.
Joined: May 29, 2003
Jan 06, 2005 12:22:00
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
I agree. Here's the link:
subject: jar files
where to keep .jar file that is called in jsp page
Jar files & JarOutputStream
Location of Property files
How to use Properties file contents
Packaging an application
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015