Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can property files have any file extension

Can property files have any file extension, like .txt? Or will they only work properly with .properties? Can I use a custom file extension, like .foo?

like image 886
osvein Avatar asked Dec 30 '25 13:12

osvein


2 Answers

Yes, you can give property files any name.

The benefit of using a recognized file type is that humans and computers have an idea of the contents will be without looking at the actual content.

like image 58
Thorbjørn Ravn Andersen Avatar answered Jan 02 '26 02:01

Thorbjørn Ravn Andersen


It can have any extension, extension doesn't matter. But then it becomes difficult to identify the file. Many OS recognize the type of file based on its extension so its better to stick to it.

like image 34
Sudhanshu Umalkar Avatar answered Jan 02 '26 03:01

Sudhanshu Umalkar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!