I want to create my own file with icon that inherit from JFrame icon, that I set it, in java and my own file use FileOutputStream and ObjectOutputStream
The Operating System chooses what icon a file is displayed with. It is your job to write data to the file and give it a file extension (in this case that's 'ckl') but it is up to the OS that the file ends up on as to what icon it is given.
It is possible to embed icons in some files (many executables often have their own icon) but ultimately it's still up to the OS.