# How do I make a custom file extension open my java program?

**URL:** <https://forum.kirupa.com/t/how-do-i-make-a-custom-file-extension-open-my-java-program/330358>\
**Category:** programming\
**Created:** [January 8, 2013, 12:36pm UTC](https://forum.kirupa.com/t/how-do-i-make-a-custom-file-extension-open-my-java-program/330358 "2013-01-08T12:36:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincentas](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@Vincentas](https://forum.kirupa.com/u/Vincentas)\
**Post date:** [January 8, 2013, 12:36pm UTC](https://forum.kirupa.com/t/how-do-i-make-a-custom-file-extension-open-my-java-program/330358/1 "2013-01-08T12:36:11Z")

</div>

Hi there,

what I’m asking is how to make any associated file type open my program with the corresponding data. For example, if you have a .doc file it opens Microsoft word with whatever is saved to that file. I know how to associate the file extension to my program, but it just opens the program from the location of the file.  
How do I make the program read the file upon start-up?
