Why does Java ignore the first line of a .properties file?
问题 I was working with an app that loads a .properties file with java.util.Properties like this: Properties _properties = new Properties(); _properties.load(new FileInputStream("app.properties")); The properties file (initially) was this: app=myApp dbLogin=myDbLogin version=0.9.8.10 server=1 freq=10000 stateGap=360000 The strange thing was that when I called _properties.getProperty("app") , it always returned null , however I could load all of the other properties without any issues. I solved the