views:

58

answers:

1

I have a game I'm writing in java, it has the functionality to save games and load them all working with .txt files but I thought it would be cool if I could have my own file type...I know I can just set it to save as a type that isn't already defined but then I get a blank icon for the file...is there a way I can give it a custom file icon in java? I've looked online etc but all I find is the microsoft website explaining some of it in c# and vb etc...

+1  A: 

I would think if you created the filetype in windows, provided you are in Windows, you can add the file type to the system. then go view existing file types. Now associate your icon to that type.

Here is how to do it in Windows:

http://www.watchingthenet.com/associate-delete-file-types-in-windows-vista.html

in previous versions of windows this can be in Explorer. Google around easy find.

Now once you have added the type, do this:

http://www.webtlk.com/2009/03/20/how-to-change-the-icon-assiciated-with-a-file-in-windows-vista-and-windows-7/

This will only do this on your machine, if you need to deploy this, and want this on another machine this way, this should give you enough to work with to script it out with like InstallShield. If you tell me the installer you will be deploying, I can even provide a script.

James Campbell
+1 an accepted answer deserves an upvote
stacker