Hi, i need to access a file outside a built project inside netbeans. Ideally i would like this file next to the .jar file as myapp.properties. If possible i would like it so that when i am compiling and running the project in netbeans the file can be with the class files or something along those likes. Either way it would be nice to have different code for built projects and just running them outside a jar.
Heres what i got so far
properties = new Properties();
InputStream in = this.getClass().getResourceAsStream("applications.properties");
properties.load(in);
in.close();
this only works if the file is next to the classes. (think thats called the classpath ? )
Thanks for any replies!!