Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to associate NetBeans IDE with certain file extensions?

For any other program I would right click on the file >> Open With >> Choose Default Program, and then I would browse and find the program and then it would appear on the list and I would click it and make sure the "Always use this program to open this kind of file" option is checked and hit ok.

However, for netbeans after I find the netbeans exe launcher file and go back to the screen where it should then be an option to select, it doesn't show up. So I can't associate any file types with netbeans.

You can imagine how frustrating it is to have to open netbeans first and then drag and drop the file I want to work on. I can never double click and start working and I work with script and html files all day.

I'm using Netbeans 7.0.1 on Windows 7 OS.

like image 493
DJ Nerf Avatar asked Sep 04 '11 01:09

DJ Nerf


2 Answers

Just found the solution.

Open Regedit (start->run->regedit)

Navigate to "HKEY_CLASSES_ROOT"

Navigate to "Applications"

Navigate to "netbeans.exe"

Expand the subfolder: "shell" and then the subfolder "open" Then click on the final folder named "command".

In the right hand side you will see a (Default) key you need to "Modify" by right clicking.

Change the location of the file to your new version of Netbeans.. Mine was pointing to the 7.0 version, and now I have 7.1beta so it was broken.

I changed mine too :

"C:\Program Files\NetBeans 7.1 Beta\bin\netbeans.exe" "%1" (with the quotes)

Now Netbeans should show up in the file associations list.

Thanks and good luck

like image 98
Dustin Avatar answered Nov 09 '22 23:11

Dustin


None of the above solutions worked for me. What did help in my case was deleting the whole key: HKEY_CLASSES_ROOT/Applications/netbeans.exe/ from Windows registry.

Now after selecting netbeans.exe in Choose Default Program dialogue Netbeans properly appears in a list of programs and I can make it a default PHP "opener".

My solution was inspired by comment to this Netbeans bug report

like image 44
J. Wrong Avatar answered Nov 10 '22 01:11

J. Wrong