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.
NB 7.1 ignores anything specified in OSX Lion's "Java Preferences"; if "--jdkhome" is not set then NetBeans hard-codes for Java 1.6.0. (Lion provides a new utility to retrieve the user's preference.) Problems: - Prevents loading some plugins which require JDK 1.7 (such as Output Handler) - Requires that JDK 1.6.0 is installed - Makes the wrong JDK the project default Workarounds: - Run NetBeans from the command line: $ /Applications/NetBeans/NetBeans\ 7.1.app/Contents/MacOS/netbeans \ --jdkhome `/usr/libexec/java_home` - Or, modify the file /Applications/NetBeans/NetBeans\ 7.1.app/Contents/Resources/NetBeans/platform/lib/nbexec as noted in patch. - (Don't bother with JDK_HOME or JAVA_HOME; NetBeans doesn't reference them.) Patch: --- o.n.bootstrap/launcher/unix/nbexec 2011-12-07 15:51:36.000000000 -0500 +++ nbexec.new 2012-01-31 22:38:20.000000000 -0500 @@ -151,7 +151,9 @@ case "`uname`" in Darwin*) - if [ -f "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java" ] ; then + if [ -x "/usr/libexec/java_home" ]; then + jdkhome=`/usr/libexec/java_home` + elif [ -f "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java" ] ; then jdkhome="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home" elif [ -f "/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java" ] ; then jdkhome="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home"
Product Version: NetBeans IDE 7.1.1 (Build 201202092200) JDK 7 build 228 (Developer Preview) System: Mac OS X version 10.7.3 running on x86_64; MacRoman; en_US (nb) Works same for me as described. Even with this newer JDK and NB build. After install of JKD 7, JDK 6 is still default (doesn't matter if NB is installed before or after JDK 7).
Assigned to new owner.
(In reply to comment #0) > NB 7.1 ignores anything specified in OSX Lion's "Java Preferences"; if > "--jdkhome" is not set then NetBeans hard-codes for Java 1.6.0. (Lion provides > a new utility to retrieve the user's preference.) > > > Problems: > > - Prevents loading some plugins which require JDK 1.7 (such as Output Handler) > > - Requires that JDK 1.6.0 is installed > > - Makes the wrong JDK the project default > > > Workarounds: Or simple modify your netbeans.conf in <ide-install-root>/etc/
(In reply to comment #0) > Patch: > > --- o.n.bootstrap/launcher/unix/nbexec 2011-12-07 15:51:36.000000000 -0500 > +++ nbexec.new 2012-01-31 22:38:20.000000000 -0500 > @@ -151,7 +151,9 @@ > > case "`uname`" in > Darwin*) > - if [ -f > "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java" ] ; > then > + if [ -x "/usr/libexec/java_home" ]; then > + jdkhome=`/usr/libexec/java_home` > + elif [ -f > "/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java" ] ; > then > > jdkhome="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home" > elif [ -f > "/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java" ] ; > then > > jdkhome="/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home" Thanks for the hint.
Marking 71patch2-candidate, but up to discussion, since this fix is in launcher, which is not distributed with AU.
Ok, agreed for sure to fix it in launcher. Also agreed to report bug against JDK 7 installer (Tonda please do so and escalate!): change "Java Preferences" and point to JDK 7 installation.
core-main/rev/4c3683e74d8d
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7155939
Integrated into 'main-golden', will be available in build *201203240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/4c3683e74d8d User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #207968: Mac OSX 10.7 Lion Java Preferences ignored
verified in 20120325. Please proceed with integration to 7.1.2.
Jirka, please proceed with integration into release71_fixes branch and follow http://wiki.netbeans.org/NetBeansPatchesProcess . Thanks in advance.
(In reply to comment #11) > Jirka, > please proceed with integration into release71_fixes branch and follow > http://wiki.netbeans.org/NetBeansPatchesProcess . Thanks in advance. http://hg.netbeans.org/releases/rev/9195c06df513
Integrated into 'releases', will be available in build *201203291150* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/9195c06df513 User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #207968: Mac OSX 10.7 Lion Java Preferences ignored (transplanted from 4c3683e74d8db6c7baf79c43fe0d0d5fbb2996b9)
verified in 7.1.2, java preferences are respected. Product Version: NetBeans IDE 7.1.2 (Build 201204101705) Java: 1.7.0_04-ea; Java HotSpot(TM) 64-Bit Server VM 23.0-b20 System: Mac OS X version 10.7.3 running on amd64; US-ASCII; en_US (nb) User directory: /Users/tomas/.netbeans/7.1.2 Cache directory: /Users/tomas/.netbeans/7.1.2/var/cache