This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Can't start netbeans with double click on associated file type | ||
---|---|---|---|
Product: | utilities | Reporter: | xeniak |
Component: | Open File | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | jrechtacek, mmirilovic |
Priority: | P3 | ||
Version: | 7.2.1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
log file
conf file |
Description
xeniak
2012-11-16 22:40:16 UTC
How did you associate .php with NetBeans (regedit, or Open With -> Choose Default Program)? Can you please attach you messages.log? (http://wiki.netbeans.org/FaqLogMessagesFile) Thanks. I tested it and it seems to work well (I used Windows 7, but it should be very similar). Please, try also opening the file from command line and check the standard output. See http://wiki.netbeans.org/FaqCliOpen. Thanks. Created attachment 128077 [details]
log file
Log file. If I remember correctly, I had to edit the registry and then use the Control Panel -> Folder Options -> File Types to make the association, as Open With -> Choose Default Program wouldn't work. It would allow me to choose Netbeans by browsing to it, but then Netbeans wouldn't be added to the program list.
(In reply to comment #3) > Created attachment 128077 [details] > log file Thanks for the file. Unfortunately, it does not contain anything helpful. > If I remember correctly, I had to edit the registry and then use the > Control Panel -> Folder Options -> File Types to make the association, as Open > With -> Choose Default Program wouldn't work. This should work. I associated it the same way. Please, try also opening the file from command line. It should print some error message if it is unable to open it. Ah!. Yes, it *does* work from the command line. Hm, that's strange. Maybe the association is not correct. Please check the Window registry, it should run the same command as you did. This page could help: http://stackoverflow.com/questions/7296853/how-to-associate-netbeans-ide-with-certain-file-extensions Ensure that the command that is invoked has its argument between double quotes. E.g. "C:\Program Files\NetBeans 7.2.1\bin\netbeans.exe" "%1" Ah ha. Just tried again with a different file, and got this: C:\Documents does not exist, or is not a plain file. C:\Program Files\NetBeans 7.2.1\bin\and does not exist, or is not a plain file. C:\Program Files\NetBeans 7.2.1\bin\Settings\xeniak\My does not exist, or is not a plain file. C:\Program Files\NetBeans 7.2.1\bin\Documents\NetBeansProjects\BOCC_Minutes\mail _Notice.php does not exist, or is not a plain file. But if I move the file to C:\temp, Netbeans opens and opens the file without a problem. Both from the command line and by double-clickicking Yes, the double quotes are there. > C:\Documents does not exist, or is not a plain file.
> C:\Program Files\NetBeans 7.2.1\bin\and does not exist, or is not a plain file.
> C:\Program Files\NetBeans 7.2.1\bin\Settings\xeniak\My does not exist, or is
> not a plain file.
> C:\Program Files\NetBeans 7.2.1\bin\Documents\NetBeansProjects\BOCC_Minutes\mail
> _Notice.php does not exist, or is not a plain file.
It seems that you tried to open file in folder
C:\Documents and Settings\xeniak\My Documents\NetBeansProjects\...
Because there were two spaces in the path, it was interpreted that you wanted to pass three parameters. So it really seems that the double quotes are missing.
Could you try searching in you regedit for string "netbeans", to be sure there is nothing like netbeans.exe %1 (without quotes)?
under HKEY_CLASSES_ROOT\Applications\netbeans.exe\shell\open\command I have: "C:\Program Files\Netbeans 7.2.1\bin\netbeans.exe" "%1" I've searched on the string "netbeans" as you suggested, and this is the only place the string "%1" (with or without quotes) appears. There are other references to netbeans, but I'm guessing that's normal. (I don't really know much about the registry.) The settings seem to be fine. But if starting from command line works correctly, double click should work too, as it obviously invokes the same command. I'm sorry, I'm out of ideas. Did you try to reinstall the whole NetBeans? Did you edit your netbeans.conf file somehow? Created attachment 128152 [details]
conf file
(In reply to comment #13) > Created attachment 128152 [details] > conf file Thank you. I cannot see any problem in the file. Sorry, I guess I wasn't clear - I got the error message in Comment 8 using the command line to try to open a file with Netbeans. So the spaces in the path are a problem both from the command line and double-clicking. I did try reinstalling. I looked at the configuration file, but didn't edit it. I've attached it just in case, but it looks innocence to me. :) It is odd - I swear the double quotes are there! But the first oddity was that I couldn't associated netbeans with the usual right-click -> Open With dialogue. Perhaps that's related? Thank you for your help. At least this isn't a terribly important problem. (In reply to comment #15) > Sorry, I guess I wasn't clear - I got the error message in Comment 8 using the > command line to try to open a file with Netbeans. It's OK, you were clear, I understand. But if you add the double quotes to file path when starting from command line, it works, I guess. > It is odd - I swear the double quotes are there! I believe you :-) > But the first oddity was that I couldn't associated netbeans with the > usual right-click -> Open With dialogue. Perhaps that's related? I had the same problem, but now it works for me. (In reply to comment #16) > But if you add the double quotes to file path when starting from command line, > it works, I guess. Yes - so the problem is probably not in Netbeans ... Hmm. Well, if I ever figure it out, I'll post back here in case someone else has the same problem. Though I imagine not many people are still using XP. (My workplace is a bit behind the times. :)) Did a bit more testing. Problem seems to be specific to PHP files. (In reply to comment #18) > Did a bit more testing. Problem seems to be specific to PHP files. So java files work fine? Does path of your java files also contain spaces? If the IDE is already running, opening of all file types works well? Thanks. Java, html, CSS, and JavaScript files all open without a problem, even with spaces in the path name. PHP files *were* opening if Netbeans was already open (as noted in my first post), but now I'm getting the same sort of error as in Comment 8. Netbeans just popped up a message saying: C:\Apache2\htdocs\Space does not exist, or is not a plain file. C:\Apache2\htdocs\Space in folder name\in does not exist, or is not a plain file. C:\Apache2\htdocs\Space in folder name\folder does not exist, or is not a plain file. C:\Apache2\htdocs\Space in folder name\name\test.php does not exist, or is not a plain file. No idea what's different. :( Maybe the association for PHP files is different from association for other files. My configuration is this: In regedit, key HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.php\OpenWithList, I have this property a set to 'netbeans64.exe' In HKEY_CLASSES_ROOT\Applications\netbeans64.exe\shell\open\command, property (Default) is set to '"C:\Users\jhavlin\core-main\nbbuild\netbeans\bin\netbeans64.exe" "%1"' Do you have similar settings in your regedit? Because it seems to be a problem in configuration, I'm closing the bug as "works for me". But please keep adding your comments here if you have new information or questions, it could help others if they have similar problems. You can also ask people on mailing list nbusers. I didn't have the first key set. But I set it and rebooted, and still have the same problem. :( I reverted to version 7.2, and this problem went away. I should add that I did have to edit HKEY_CLASSES_ROOT\Applications\netbeans.exe\shell\open\command by hand to refer to Netbeans 7.2 rather than Netbeans 7.2.1, as has been mentioned in other threads on this issue. For anybody else having this problem, I finally got Netbeans 7.2.1 to open PHP files properly by setting HKEY_CLASSES_ROOT\Applications\netbeans.exe\shell\open\command to "C:\Program Files\Netbeans 7.2\bin\netbeans.exe" "%1" AND changing the name of the Netbeans folder from Netbeans 7.2.1 to Netbeans 7.2 > AND changing the name of the Netbeans folder from Netbeans 7.2.1 to Netbeans
> 7.2
It's odd, it works for me if the installation folder name is NetBeans 7.2.1.
Good news that you have found a workaround :-) Thanks for your comments.
|