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 166834 - Use default Java for the user who run installer and not for root
Summary: Use default Java for the user who run installer and not for root
Status: RESOLVED FIXED
Alias: None
Product: installer
Classification: Unclassified
Component: Mac Native (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-10 09:08 UTC by dlipin
Modified: 2013-01-08 14:59 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Example of plist file with Java settings (1.13 KB, text/xml)
2009-06-10 09:08 UTC, dlipin
Details
plist with more user-friendly mime type (1.13 KB, text/plain)
2009-06-10 09:12 UTC, dlipin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dlipin 2009-06-10 09:08:04 UTC
Currently default JDK is determined for the root user since the installer is running under it and not for the user who 
really ran the installer. See also 166753.

To get default JDK for the current user the following can be taken into account.
The current user $HOME environment variable is not changed.

If the user changes the default JDK, then the plist file is created at 
~/Library/Preferences/ByHost/com.apple.java.JavaPreferences.*.plist.
where * is some sequence of chars/digits (e.g. 000a958f6df6).

By default, this file is in binary form. To convert it to XML, do
$ cp ~/Library/Preferences/ByHost/com.apple.java.JavaPreferences.000a958f6df6.plist /tmp/
$ plutil -convert xml1 /tmp/com.apple.java.JavaPreferences.000a958f6df6.plist

The example of this plist file (converted) is attached. The preferred JKD order should be read from Applications 
section not from Applets.
Comment 1 dlipin 2009-06-10 09:08:37 UTC
Created attachment 83384 [details]
Example of plist file with Java settings
Comment 2 dlipin 2009-06-10 09:12:21 UTC
Created attachment 83385 [details]
plist with more user-friendly mime type
Comment 3 Jiri Rechtacek 2012-10-07 12:58:56 UTC
Assigned to new owner.
Comment 4 Libor Fischmeistr 2013-01-08 14:58:09 UTC
Since NetBeans 7.3 the default Java is used - http://wiki.netbeans.org/Recommended7u10