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 162518 - Launcher should use the user default java
Summary: Launcher should use the user default java
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: t_h
URL:
Keywords:
: 163859 (view as bug list)
Depends on:
Blocks: 159846
  Show dependency tree
 
Reported: 2009-04-13 16:14 UTC by Yulia Novozhilova
Modified: 2009-04-29 08:36 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
get_user_jdk_for_MacOSX.sh (1.85 KB, text/plain)
2009-04-13 16:17 UTC, Yulia Novozhilova
Details
patch for nbexec (1.70 KB, text/plain)
2009-04-24 09:12 UTC, Yulia Novozhilova
Details
Corrected nbexec.patch (1.70 KB, text/plain)
2009-04-24 13:19 UTC, Yulia Novozhilova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yulia Novozhilova 2009-04-13 16:14:23 UTC
Please, correct nbexec script. Currently jdkhome is set to /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
for Mac OS X by default. 

-----------------nbexec------------
   case "`uname`" in
        Darwin*)
        if [ -x /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java ] ; then
            jdkhome=/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home
        fi
        ;;
...
-----------------------------------
 
But it should check what the user default is and use that (often on Mac OS X Leopard users use jdk 6.0.* as default).
It is impossible to determine from Mac native installer what java is used by the user, so nbexec must take care of that.
Attached script can be used in nbexec (after "Darwin*)") for jdkhome set-up.
Comment 1 Yulia Novozhilova 2009-04-13 16:17:11 UTC
Created attachment 79986 [details]
get_user_jdk_for_MacOSX.sh
Comment 2 Yulia Novozhilova 2009-04-24 09:10:52 UTC
I've prepared a patch for nbexec (attached) to fix this issue. Could you please review. If everything is ok I will push
the changes into main asap.
Comment 3 Yulia Novozhilova 2009-04-24 09:12:54 UTC
Created attachment 80824 [details]
patch for nbexec
Comment 4 Yulia Novozhilova 2009-04-24 13:19:22 UTC
Created attachment 80846 [details]
Corrected nbexec.patch
Comment 5 Yulia Novozhilova 2009-04-24 13:21:06 UTC
Patch is corrected 1.5. --> 1.6.0 in line: 
if [ $? -eq 0 ] && [ -n "`echo \"$java_version\" | grep 1.5.0`" ] ; then  --> 
if [ $? -eq 0 ] && [ -n "`echo \"$java_version\" | grep 1.6.0`" ] ; then

Comment 6 t_h 2009-04-28 10:53:21 UTC
Patch seems OK, please integrate.
Comment 7 t_h 2009-04-28 10:53:54 UTC
*** Issue 163859 has been marked as a duplicate of this issue. ***
Comment 8 Yulia Novozhilova 2009-04-28 13:55:20 UTC
Thanks for review.
Fixed: http://hg.netbeans.org/main/rev/b0b443fbbbc0
Comment 9 Petr Jiricka 2009-04-29 08:36:15 UTC
Thanks, works for me now.