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 190792 - virgin Mac install of Java and Netbeans leads to deadend
Summary: virgin Mac install of Java and Netbeans leads to deadend
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Assignee: Yulia Novozhilova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-06 01:36 UTC by polyglotinc
Modified: 2010-10-19 10:04 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
nbexec_mac.patch (1.82 KB, application/octet-stream)
2010-10-07 16:42 UTC, Yulia Novozhilova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description polyglotinc 2010-10-06 01:36:26 UTC
On Mac OS 10.5.8, when downloading and executing the native Mac installer for Netbeans complete bundle ( from http://netbeans.org/downloads/start.html?platform=macosx&lang=en&option=all ),
the installer doesn't complain, but when attempting to execute "NetBeans 6.9.1",
it complains that Java 1.6 is not installed.

However, installing Java 1.6 via the Apple-supplied-installer (BECAUSE THE OFFICIAL JAVA SITE TELLS YOU TO USE APPLE'S) doesn't help...Even after reinstalling NetBeans. [ see http://www.oracle.com/technetwork/java/javase/downloads/index.html ]

The NetBeans installer should ask where Java 1.6 is if it can't find it on its own. The NetBeans app should ask where Java 1.6 is rather than simply gagging.
Since there is no command line involved in all this GUI Mac stuff, simply
documenting a command-line argument like --jdkhome doesn't help.

AND AT THE VERY LEAST, all the steps needed to install everything needed for Netbeans on a virgin Mac should be in the install instructions!!!
i.e. on the web page...
 http://netbeans.org/community/releases/69/install.html
Comment 1 Yulia Novozhilova 2010-10-06 12:56:01 UTC
Hi,

Do you use Intel-based Mac or PowerPC?
Please attach /var/log/install.log file.
Could you also please run the following command and attach the output here?
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/unpack200 --help
Comment 2 polyglotinc 2010-10-06 16:16:24 UTC
I found a solution WHICH SHOULD BE ADDED TO THE INSTALLATION INSTRUCTIONS.
Apparently when the Java SDK is downloaded to a Mac, it is not always made the new default JRE.  There is a GUI application on the Mac called "Java Preferences" (often found in the Utilities subfolder in the Applications folder).
Using this app, one can change the Java 6 JRE/SDK to be the default one, and then NetBeans will run.
Comment 3 Yulia Novozhilova 2010-10-07 14:54:04 UTC
Downgrading to P3 since a workaround exists.
It is a launcher's problem, currently it tries to set users default java for jdkhome. It should use Java 1.6 in case if user's default is 1.5

I'm going to fix it in trunk.
Comment 4 Yulia Novozhilova 2010-10-07 16:42:19 UTC
Created attachment 102300 [details]
nbexec_mac.patch

Antonin, please review the patch attached. If you are agree, I'll commit the changes. 
The idea is that NetBeans runs on Java 6 now, so no need to check users defaults anymore.
Comment 5 Antonin Nebuzelsky 2010-10-08 09:33:21 UTC
Yulia, the patch looks OK to me.

Just one comment. I don't know what is the exact file layout of JDK installations on MacOSX, and here we are checking for folders "1.6" and "1.6.0". On other platforms individual JDK 6 updates are in indifferent folders. But I guess on Mac it is simpler, right?

Reassigning back to you for the integration.
Comment 6 Yulia Novozhilova 2010-10-19 10:04:13 UTC
http://hg.netbeans.org/main/rev/747d82e30477