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 189105

Summary: Platform Application does not start correctly if run by symlink to the bin/<appname>
Product: platform Reporter: normen
Component: Launchers&CLIAssignee: dlipin <dlipin>
Status: RESOLVED FIXED    
Severity: normal CC: spoonerj30
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Workaround fix for ConfigurationLogic.java

Description normen 2010-07-31 07:58:48 UTC
The Installer creator of NB6.9 for NetBeans platform software creates non-working OSX Applications. The installer itself works on OSX but when double-clicking the application it creates a generic, empty NetBeans platform application starts up.

I was able to fix the installer by tweaking the created application in the install() method of the used ConfigurationLogic.java file in the following way:
1) Rename the link to the executable in Contents/MacOSX from "exectuable" to the application branding name
2) Copy the real icns icon file to Contents/Resources/*application_branding_name*.icns (no link!)
3) Update the executable name and icon name in Info.plist

The first step fixes the application starting up into a generic app and the second step fixes a problem where the icon in the dock would switch to the generic java icon when the application starts.

Cheers,
Normen

P.S. During debugging this I had to find out that the installer creator function always uses the harness folder from *NetBeans Installation*/harness even if theres a different harness folder set for the current project. Would be nice if the function used the projects harness folder.
Comment 1 normen 2010-07-31 08:12:10 UTC
Created attachment 101132 [details]
Workaround fix for ConfigurationLogic.java

Workaround fix for ConfigurationLogic.java
Location: *NB Install Dir*/harness/nbi/stub/ext/components/products/helloworld/src/org/mycompany/ConfigurationLogic.java
Comment 2 dlipin 2010-08-31 14:14:05 UTC
The actual reason is that the current platform application launcher does not handle correctly the case when it is run via symlink to the launcher.

In fact, without this fix the application starts with
Current Directory = /
User Directory = /
in the messages.log and that reminds me the Issue #189656.

This is fixed in core-main#212edbb66859.

You can do the same in the netbeans installation directory, see file harness/launchers/app.sh.
Comment 3 Quality Engineering 2010-09-01 03:28:16 UTC
Integrated into 'main-golden', will be available in build *201009010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/212edbb66859
User: Dmitry Lipin <dlipin@netbeans.org>
Log: Issue #189105 Platform Application does not start correctly if run by symlink to the bin/<appname>