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.

Bug 137169

Summary: Can not register NetBeans as my application for opening files
Product: installer Reporter: Petr Jiricka <pjiricka>
Component: Mac NativeAssignee: Libor Fischmeistr <lfischmeistr>
Status: NEW ---    
Severity: blocker CC: anebuzelsky
Priority: P2    
Version: 6.x   
Hardware: All   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 138943, 235558    
Bug Blocks:    

Description Petr Jiricka 2008-06-13 14:07:20 UTC
I'd like to set up NetBeans as a default application for opening files on Mac OS X:

1. Install NetBeans
2. In Finder, find a .php file
3. Right-click it and choose Open With -> Other...
4. Browse to the location of NetBeans (for me it is under Applications -> NetBeans -> NetBeans 6.1.app)
=> NetBeans 6.1.app can not be selected, so I can not use it for opening .php files (or any other files). 

I am using NetBeans 6.1 on Mac OS X 10.4 "Tiger".
Comment 1 dlipin 2008-06-13 18:41:13 UTC
Petr,

why do you think that it is the installer issue?

Dmitry
Comment 2 Petr Jiricka 2008-06-16 11:04:05 UTC
Hi Dmitry, I am not sure this is an installer issue, feel free to reassign. Where do you think it should belong?
Comment 3 dlipin 2008-06-19 11:41:50 UTC
I guess, it does not work for the same reason as on windows with "Open With" menu item - bin/netbeans.exe (bin/
netbeans) requires addtional argument to open the file:
- this works: bin/netbeans --open file.php
- this does not: bin/netbeans file.php

Maybe it can be solved by tweaking .app description, maybe not, need to check.
Comment 4 dlipin 2008-06-19 12:51:34 UTC
Something to start with...
http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/Concepts/DocTypePList.html

Making the issue the enhancement. In fact, it is.
Comment 5 Petr Jiricka 2008-07-03 12:56:12 UTC
> - this works: bin/netbeans --open file.php
> - this does not: bin/netbeans file.php

I filed a separate issue 138943 for this. Could this be a NB Core issue?

Comment 6 dlipin 2008-07-03 13:05:14 UTC
> - this works: bin/netbeans --open file.php
> - this does not: bin/netbeans file.php
BTW, both versions works fine for me with a java file... anyway, if "bin/netbeans file.php" does not work for you then 
it is certainly NetBeans core issue, not the installer one.
Comment 7 Jiri Rechtacek 2012-10-07 12:58:24 UTC
Assigned to new owner.
Comment 9 Libor Fischmeistr 2013-04-04 13:26:29 UTC
Possible workaround (may cause some other more serious problems):

In Finder show context menu on NetBeans App and click on Show Package Contents.
In Contents/Info.plist change:

When opening with XCode: "Executable File" property (in XCode) form "netbeans" to "bin/netbeans"


When opening with some text editor:

<key>CFBundleExecutable</key>
<string>netbeans</string>

change to

<key>CFBundleExecutable</key>
<string>bin/netbeans</string>

Now you should be able to open files from finder with NetBeans.