Skip to content

Java Hints Preferences

Siddharth Srinivasan edited this page Dec 22, 2025 · 8 revisions

Follow the steps given below to setup the custom hints preferences:

  1. Install Apache NetBeans IDE.
  2. Create a "New Project..." with the Java with Ant | Java Application project template.
    New Project - Java with Ant
  3. Open the File menu | Project Properties, and, select the Hints section in the left pane.
    Project Properties - Hints
  4. Select Use project-specific options.
  5. In the "Language" drop-down: Choose "Java".
  6. Click on the "Advanced..." button to open the Project Specific Options Settings with the Configuration File chooser. Advanced - Configuration File chooser
  7. Click on the "Browse..." button to select any folder where the file should be saved.
    Custom configuration file path
    • Note the full path of the xml file. This is referred below as PATH_TO_EXPORTED_NETBEANS_HINTS_PREFERENCES_XML.
  8. Adjust and edit any of the hints settings as required.
  9. Save the settings by clicking the OK button.
  10. Confirm that the configuration file with the name provided in step 7. above, cfg_hints.xml by default, has been created successfully in the folder location chosen above.
  11. Set the jdk.hints.preferences setting in VS Code:
    • In VS Code, open the "Command Palette" (Ctrl+Shift+P) \
    • Type "Preferences: Open User Settings (JSON)" \
    • Set the following property:
    "jdk.hints.preferences": "PATH_TO_EXPORTED_NETBEANS_HINTS_PREFERENCES_XML"
    

Your custom Java hint preferences should now be honoured by the Oracle Java extension in VS Code.

While this is not a friendly solution, performing this task should be a one-time requirement, unless you find yourself regularly adjusting your hints preferences.

Clone this wiki locally