FaqMacJdkHome

(Difference between revisions)
(Created page with '===How to specify Java Home on Mac=== Mac OS X users were used to use Java Preferences application to determine what version of Java to use. The Software Update Java for OS X 2…')
 
(2 intermediate revisions not shown)
Line 1: Line 1:
-
===How to specify Java Home on Mac===
+
===How to specify Java Home on Mac OS X===
-
Mac OS X users were used to use Java Preferences application to determine what version of Java to use.
+
After applying Software Update Java for OS X 2012-006 1.0 - http://support.apple.com/kb/HT5493 - Mac OS X users are no longer able to use the Java Preferences application to specify the version of Java that is used by applications. After applying the update, NetBeans IDE runs on the most recent version of Java that is installed, with Java SE 6 as the minimum required version.  
-
The Software Update Java for OS X 2012-006 1.0 - http://support.apple.com/kb/HT5493 - removes the Java Preferences application.
+
To change the Java Home that is used by the IDE to a version of Java that is not the most recent version you should specify the version in the [[FaqNetbeansConf|netbeans.conf]] configuration file.
 +
 
 +
Step by step:
 +
 
 +
# Open any editor
 +
# Press CMD+O (to open the "Open Dialog Windows")
 +
# In the opened window press CMD+SHIFT+G (to enter the path manually)
 +
# Type <code>"/Applications/NetBeans/NetBeans 7.3 Beta 2.app/Contents/Resources/NetBeans/etc/netbeans.conf"</code> or <code>"/Applications/NetBeans/NetBeans 7.3 Beta 1.app/Contents/Resources/NetBeans/etc/netbeans.conf"</code> or <code>"/Applications/NetBeans/NetBeans 7.2.1.app/Contents/Resources/NetBeans/etc/netbeans.conf"</code> or <code>"/Applications/NetBeans/NetBeans 7.2.app/Contents/Resources/NetBeans/etc/netbeans.conf"</code> or whatever version of NetBeans you've got, and press ENTER (or click on "Go" button)
 +
# Press ENTER again (or click on "Open" button)
 +
# In the <code>netbeans.conf</code> file, search the line that looks like this <code>#netbeans_jdkhome="/path/to/jdk"</code>
 +
# Under this line add <code>netbeans_jdkhome="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"</code>
 +
# Press CMD+S to save the document.
-
After this Software Update, the NetBeans IDE runs on latest installed version of Java but Java SE 6 as the minimum. To change the Java Home on other Java 6 and later versions, you should configure [[FaqNetbeansConf|netbeans.conf]]
 
--------
--------

Current revision as of 15:45, 8 March 2013

How to specify Java Home on Mac OS X

After applying Software Update Java for OS X 2012-006 1.0 - http://support.apple.com/kb/HT5493 - Mac OS X users are no longer able to use the Java Preferences application to specify the version of Java that is used by applications. After applying the update, NetBeans IDE runs on the most recent version of Java that is installed, with Java SE 6 as the minimum required version.

To change the Java Home that is used by the IDE to a version of Java that is not the most recent version you should specify the version in the netbeans.conf configuration file.

Step by step:

  1. Open any editor
  2. Press CMD+O (to open the "Open Dialog Windows")
  3. In the opened window press CMD+SHIFT+G (to enter the path manually)
  4. Type "/Applications/NetBeans/NetBeans 7.3 Beta 2.app/Contents/Resources/NetBeans/etc/netbeans.conf" or "/Applications/NetBeans/NetBeans 7.3 Beta 1.app/Contents/Resources/NetBeans/etc/netbeans.conf" or "/Applications/NetBeans/NetBeans 7.2.1.app/Contents/Resources/NetBeans/etc/netbeans.conf" or "/Applications/NetBeans/NetBeans 7.2.app/Contents/Resources/NetBeans/etc/netbeans.conf" or whatever version of NetBeans you've got, and press ENTER (or click on "Go" button)
  5. Press ENTER again (or click on "Open" button)
  6. In the netbeans.conf file, search the line that looks like this #netbeans_jdkhome="/path/to/jdk"
  7. Under this line add netbeans_jdkhome="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"
  8. Press CMD+S to save the document.



Applies to: NetBeans IDE 7.2 or later

Platforms: Mac OS X 10.7 or later

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo