I'm developing a java swing application and it works fine, but after building my app , when I run the jar file , my app doesn't works as I want. so to know what's the problem I used this test :
FileReader reader;
Properties props;
try{
reader = new FileReader("src\\inputs.properties");
props = new Properties();
props.load(reader2);
JOptionPane.showMessageDialog(null,reader.getClass());
}catch(Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
so when i run the app it works fine and i get this message : message before building the app
And that means that my properties file is loaded.
But when I build the app, when I run it I get this message :
message after building the app
My problem is how to make my properties file works after building may app?
I'm using netbeans and this is my project structure :
-source Package
--default package
-- inputs.properties
--myapppackage
--myapppackage.java
thanks in advance.