I am a bit confused between using a constants file and properties file in Java.
How to decide when to use Constants.java and when to use a .properties
Properties have the advantage of being externalizable. You can have one property file for development, another for test and another for production. A lot of times, though, rarely changed properties, that are internal to the workings of the software are put into properties file making them hard to manage.
OTOH constants are compiled so any errors will be caught at compile time.
So the answer is , it depends. If the values in the properties are truly configuration changes you want to externalize then use properties file. else make them Java constants. You might end up using both, though.
There are many different aspects to consider. The most important are that
These aspects make properties file really useful for storing configurations.
On the other hand, constants classes need to be compiled, but are "safer" if you plan not to change those constants very often.