I’m developing a Java Application in Netbeans. The application uses a .properties file (Properties class). The problem is that Netbeans insert this properties file into final .jar file.
- How can I make Netbeans not to do this and put the properties file out of jar file?
- In this case, how can I use the properties file in code?
Look at the source directories that NetBeans is asked to insert into the JAR and remove the
.propertiesfrom the list.You can always read the
.propertiesfile by reading it as anInputStream, as long as it’s in theCLASSPATH.The question is: Why do you feel the need to move it out of that JAR? At least it’s in the CLASSPATH that way. You seem to be acting against your own best interests here.