The following is an overview of useful information that we hope will help you to get NetBeans IDE up and running in Mac OS X.
System Requirements and Installation
For the minimum and recommended hardware configuration, see the NetBeans IDE 8.0 Release Notes.
For Mac OS X installation instructions, see the NetBeans IDE 8.0 Installation Instructions for Mac OS X.
Mar 23, 2016 Get Java for your Mac. Download Java for OS X directly from Oracle. Get the latest version. If an app or webpage you want to use asks you to install Java software, you can download the current version of Java for OS X directly from Oracle's website. Nov 02, 2017 Questions: I have installed the JDK on Mac OS X v10.8 (Mountain Lion). When I upgraded it to Mac OS X v10.9 (Mavericks) and ran java -version in the terminal, it showed: No Java runtime present, requesting install. Then I manually installed the JDK (1.7) on my Mac. It seems that the installation worked fine. When the installation was done, I.
Issues and FAQs
See the following documents for Mac-related issues and FAQs.
Shortcuts on Mac OS X
The IDE has a default set of keyboard shortcuts that you can use to invoke functions. In some cases, the default IDE shortcuts can conflict with default Mac OS shortcuts. In particular, some function keys used by the Mac OS are known to conflict with some default IDE shortcuts. If you find that some keyboard shortcuts are not behaving as expected, you can modify the shortcut for a particular IDE function by choosing NetBeans > Preferences (Cmd-,) from the main menu and clicking Keyboard in the Options window. You can modify the default Mac OS shortcut by opening System Preferences and clicking Keyboard & Mouse. For more, see the Apple Help topic Using function keys on portable computers.
For a list of NetBeans' Source Editor keyboard equivalents on Mac OS X, see the following table:
Scrolling and Selecting | |
---|---|
Keys | Action |
Cmd-[ | Moves the insertion point to the highlighted matching bracket. Note that this shortcut only works when the insertion point is located immediately after the opening bracket. |
Cmd-Shift-[ | Selects the block between a pair of brackets. Note that this shortcut only works when the insertion point is located immediately after either the opening or closing bracket. |
Ctrl-G | Jumps to any specified line. |
Cmd-A | Selects all text in the file. |
Modifying Text | |
---|---|
Keys | Action |
Cmd-Shift-J | Opens the Internationalize dialog box that you can use to insert an localized string at the insertion point. |
Code Folding | |
---|---|
Keys | Action |
Cmd-Minus (-) | Collapses the block of code in which the insertion point is currently located. |
Cmd-Plus (+) | Expands the block of code which is adjacent to the insertion point. |
Cmd-Shift-Minus (-) | Collapses all blocks of code in the current file. |
Cmd-Shift-Plus (+) | Expands all blocks of code in the current file. |
Recording Macros | |
---|---|
Keys | Action |
Cmd-J then S | Initiates the recording of key sequences for a macro. |
Cmd-J then E | Stops the recording of key sequence for a macro and opens the Recorded Macro dialog enabling you to name the new macro. |
Java Jdk For Mac Os X 10.9 Download
Cutting, Copying, Pasting, and Deleting Text | |
---|---|
Keys | Action |
Cmd-Z | Undo. Reverses a series of editor actions one at a time (excluding Save). |
Cmd-Y | Redo. Reverses a series of Undo commands one at a time. |
Cmd-X | Cut. Deletes the current selection and places it on the clipboard. |
Cmd-C | Copy. Copies the current selection to the clipboard. |
Cmd-V | Paste. Pastes the contents of the clipbard at the insert point. |
Delete | Delete. Deletes the current selection. |
Cmd-E | Deletes the current line. |
Cmd-K | Copies the word preceding the insertion point and then pastes it after the insertion point (the insertion point must be in the whitespace preceeding or following a word). Press K multiple times to cycle through preceding words in succession. |
Cmd-L | Copies the word following the insertion point and pastes it at the insertion point (the insertion point must be located in the whitespace preceeding or following a word.) Press L multiple times to cycle through consecutive following words. |
Searching for Text | |
---|---|
Keys | Action |
Cmd-G | Selects the next occurrence of the word found during the search. |
Cmd-Shift-G | Selects the previous occurrence of the word found during the search. |
Cmd-F | Opens the Find dialog box. |
Cmd-R | Opens the Find and Replace dialog box. |
Setting Tabs | |
---|---|
Keys | Action |
Tab | Shifts all text to the right of the insertion point one tab stop to the right. |
Cmd-T | Shifts text in the line containing the insertion point to the right one tab stop. |
Cmd-D | Shifts text in the line containing the insertion point to the left one tab stop. |
Modifying Code | |
---|---|
Keys | Action |
Ctrl-Spacebar | Opens the Java code completion dialog box. |
Shift-Enter | Enters the text that is selected in the code completion box into your file. |
Ctrl-I | Opens the Insert Code pop-up menu. |
Ctrl-Shift-I | Adds an import statement to the import section of the code when the cursor is over the class name to be imported. |
Shift-Spacebar | Adds a space without checking for abbreviations to expand. |
Using Bookmarks | |
---|---|
Keys | Action |
Cmd-F2 | Sets or unsets a bookmark at the current line. |
F2 | Goes to the next bookmark. |
Note:
For a complete list of NetBeans IDE keyboard equivalents, check the Keyboard Shortcuts Card by choosing Help > Keyboard Shortcuts Card. Alternately, you can reference the Keyboard Shortcuts section of the NetBeans IDE built-in Help.
For a complete list of NetBeans IDE keyboard equivalents, check the Keyboard Shortcuts Card by choosing Help > Keyboard Shortcuts Card. Alternately, you can reference the Keyboard Shortcuts section of the NetBeans IDE built-in Help.
You can access the Options window on Mac OS X by selecting NetBeans > Preferences (⌘-,) in the main menu.
Tips & Tricks
The following are some techniques you can use to get more out of NetBeans IDE on Mac OS X.
- To emulate right mouse click behavior. Use Ctrl-click by pressing and holding the Control button while clicking. Also see issue #32463 regarding right-click emulation on multiple files.
- To specify which JDK to run NetBeans on.Use the --jdkhome <path> option when starting NetBeans. <path> is the root of the JDK installation. The NetBeans installer looks for suitable JDK installations available on user's system and allows you to select the one you want to run NetBeans on. However, the setting may become obsolete when the user installs a new JDK later, or may be inconvenient if you want to run the IDE with another JDK. That's where the
--jdkhome
switch comes in handy.Note: If you want to set the <path> option permanently, you can do so in the netbeans.conf file as described below. - To make custom startup parameters permanent.If you want NetBeans to always start with specific options such as --userdir, --jdkhome, --fontsize, etc., so that you don't have to type them on the command line at every launch, the most convenient way is to add your custom options directly to the NetBeans configuration (
netbeans.conf
) file.To do this, Control-click the NetBeans application icon and choose Show Package Contents from the contextual menu. In the Finder window that appears, navigate to theContents/Resources/NetBeans/etc/
directory, Control-clicknetbeans.conf
, choose Open With from the contextual menu, and select your preferred text editor. Then add the custom parameters you wish to use and save your changes.The netbeans.conf file can include the following entries:- netbeans_default_userdir: the default location and name of the userdir. Note that this entry is only valid in the global configuration file. It cannot be redefined in the local netbeans.conf file, because the launcher already needs to know the location of the userdir when the local netbeans.conf file is being processed.
- netbeans_default_options: any parameters passed to NetBeans or the JVM such as memory configuration parameters, debugging options, --fontsize, various experimental switches, etc.
- netbeans_jdkhome: the default location of the JDK to run NetBeans on. Note that this can be overridden with the --jdkhome switch.
More Information
For more information, visit https://netbeans.org/.
You can also find news, articles, additional modules, and other useful information on the NetBeans project web site. Since NetBeans is an open-source project, the web site also provides access to source code, a bug database, information on creating your own NetBeans modules, and much more.
![10.9 10.9](/uploads/1/2/6/6/126602309/586281435.png)
Feedback
If you encounter any Mac OS X-specific problems, please let us know by filing a bug, but don't forget to specify that you are using the Mac OS X operating system.
You can also keep up to date on NetBeans IDE and interact with the NetBeans community by signing up for NetBeans project mailing lists at https://netbeans.org/community/lists/.
This topic includes the following sections:
System Requirements for Installing the JDK on macOS
The following are the system requirements for installing the JDK on macOS:
- Any Intel-based computer running macOS.
- Administrator privileges.You cannot install Java for a single user. Installing the JDK on macOS is performed on a systemwide basis for all users. Administrator privileges are required to install the JDK on macOS.
Determining the Default JDK Version on macOS
When starting a Java application through the command line, the system uses the default JDK.
There can be multiple JDKs installed on the macOS system.
You can determine which version of the JDK is the default by entering
java -version
in a Terminal window. If the installed version is 12 Interim 0, Update 0, and Patch 0, then you see a string that includes the text 12
. For example: To run a different version of Java, either specify the full path, or use the
java_home
tool. For example: $ /usr/libexec/java_home -v 12 --exec javac -version
Installing the JDK on macOS
- Download the JDK
.dmg
file,jdk-12.
interim.update.patch-macosx-x64.dmg
.Before the file can be downloaded, you must accept the license agreement. - From either the browser Downloads window or from the file browser, double-click the
.dmg
file to start it.A Finder window appears that contains an icon of an open box and the name of the.pkg
file. - Double-click the
JDK 12.pkg
icon to start the installation application.The installation application displays the Introduction window. - Click Continue.
- Click Install. A window appears that displays the message: Installer is trying to install new software. Enter your password to allow this.
- Enter the Administrator user name and password and click Install Software.The software is installed and a confirmation window is displayed.
After the software is installed, you can delete the
.dmg
file if you want to save disk space. Uninstalling the JDK on macOS
You must have Administrator privileges.Note:
Do not attempt to uninstall Java by removing the Java tools from
/usr/bin
. This directory is part of the system software and any changes will be reset by Apple the next time that you perform an update of the OS. - Go to
/Library/Java/JavaVirtualMachines
. - Remove the directory whose name matches the following format by executing the
rm
command as a root user or by using thesudo
tool:/Library/Java/JavaVirtualMachines/jdk-interim.update.patch.jdk
For example, to uninstall 12 Interim 0 Update 0 Patch 0:$ rm -rf jdk-12.jdk
Installation FAQ on macOS Platform
This topic provides answers for the following frequently asked questions about installing JDK on macOS computers.
![10.6.8 10.6.8](/uploads/1/2/6/6/126602309/333557948.png)
1. How do I find out which version of Java is the system default?
Java Jdk For Mac Os X 10.99
When you run a Java application from the command line, it uses the default JDK. If you do not develop Java applications, then you do not need to worry about this. See Determining the Default JDK Version on macOS.
2. How do I uninstall Java?
See Uninstalling the JDK on macOS.
3. After installing Java for macOS 2012-006, can I continue to use Apple's Java 6 alongside the macOS JDK for Java 12?
If you want to continue to develop with Java 6 using command-line, then you can modify the startup script for your favorite command environment. For bash, use this:
$ export JAVA_HOME=`/usr/libexec/java_home -v 12`
Some applications use
/usr/bin/java
to call Java. After installing Java for macOS 2012-006, /usr/bin/java
will find the newest JDK installed, and will use that for all of the Java-related command-line tools in /usr/bin
. You may need to modify those applications to find Java 6, or contact the developer for a newer version of the application. 4. Can I restore Apple Java after uninstalling Oracle Java?
Go back to Apple Java using the following instructions:
- Uninstall Oracle Java by deleting the plug-in file. From a command-line, enter:
$ sudo rm -rf '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin'
- Create a symlink using the following command, entered on a single line:
$ sudo ln -s /System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin'
5. What happened to the Java Preferences app in Application Utilities?
The Java Preferences app was part of the Apple Java installation and is not used by Oracle Java. Therefore, macOS releases from Apple that do not include Apple Java will not include Java Preferences.