How to Open file by double clicking on it in our .jar file?

This article helps desktop application developer in java. If you have application which saves its own file format. You always wanted to handle that file in your application. We use windows registry to handle the request. Let me write the topic that users searches over internet so it'll help them too.

How to open my file format in .jar file?

How to open file by double clicking on it in our .jar file?

Open file in .jar file?

Setup our file format extension with our .jar file?

One can have their own file format created through JAVA application but the major challenge is “How to open that file by double clicking on that and it’ll open in our application or in jar file?” Here we comes with the solution follow the below steps and your problem solved. So first of all you have decided your file format like we are using (.beta). This is my Personal editor application file format.Now setting up that format. We are working in Windows machine.

Step 1: Open Run. Start>Run or Window key + R

Step 2: Type “regedit” (without double quote).

Create New Key under HKEY_CLASSES_ROOT.

Name it with your file format extension. (.beta) Now Double click on (Default) and change the value to Your_File_FormatFile

Now Create another key under the same path HKEY_CLASSES_ROOT. And name it same as given above Your_File_FormatFile and create other key in hierarchy shown in below image.