JJJ's Blog

  • WordPress
  • GitHub
  • Twitter/X
  • Netbeans crashing on macOS

    For the past few years & months, Netbeans (now version 20) has been really struggling to keep up with the type of work that I most frequently use it for (helping to maintain & improve WordPress and a few hundred plugins here or there) and it has really been a bummer because no matter how hard I’ve tried I have not felt any joy when writing PHP in VSCode – only frustration.

    Whenever I would launch Netbeans, it would open fine, and open projects & directories mostly OK, but then some other days & times it just felt far-far-far more sluggish than it used to (and than it should, given the relatively monster machine I am running it on).

    Like one does, I wasted a lot of time trying a bunch of things I found on The Internet that did nothing measurable; switched JDK versions, hard-coded a reserved amount of memory for the JVM, reinstalled, safe-mode, ask nicely, yada yada yada…

    The magic bullet, though, for me, harkens back to an old blog post of mine about not allowing macOS to index your node_modules directories.

    By adding |node_modules to Netbeans’ regular expression of “Files ignored by the IDE” it not only stopped crashing, but I am certain that I reduced the volume of indexing work it was doing by several ga’thousand percent, as every WordPress plugin is likely to have several megabytes of “modules” that are only used for tooling during its development and basically useless when it comes to day-to-day coding.

    Netbeans is the best hammer I never paid for. As soon as I stopped asking my hammer to write a bunch of notes for me that I’d never read anyways, I was able to pound nails again.

    Moral of the story? If there is one, I guess it must be: “John you are handsome & wise & always right and you should stop doubting yourself” 🙌

    JJJ

    January 12, 2024
    Netbeans
    macOS
  • Install Java & Netbeans on macOS via Homebrew

    brew install java
    sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
    echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zshrc
    echo 'export CPPFLAGS="-I/opt/homebrew/opt/openjdk/include"' >> ~/.zshrc
    brew install netbeans

    JJJ

    August 24, 2023
    Netbeans, Apple, macOS
    macOS
  • Netbeans menu on Mavericks Beta 6

    If you use Netbeans on Mavericks, and updated to Beta 6 (Build 13A558) you may have noticed your menu bar items fail to appear, looking something like this:

    Netbeans no Menu

    This comes from the default Java menu bar nib files being accidently removed from the build: /System/Library/Frameworks/JavaVM.framework/Versions/A/Resources/*.lproj/DefaultApp.nib

    The workaround is to install the full Java SE 6 JDK from http://support.apple.com/kb/DL1572. This reinstalls the Java SDK in the correct locations, and will be deleted on the next Mavericks update (so there’s no harm in this temporary fix.)

    JJJ

    August 23, 2013
    Netbeans, Uncategorized
    Mavericks, Menu
  • View . files and directories in Netbeans

    By default, Netbeans keeps dot files and directories hidden from the project tree. If you want to show them, never fear — there is a way.

    Preferences > Miscellaneous > Files > Ignored Files Pattern

    ^(CVS|SCCS|vssver.?.scc|#.*#|%.*%|_svn)$|~$|^.(?!htaccess$)$

    Basically, remove the .* at the end of the regular expression, and you’re good to go.

    JJJ

    January 2, 2013
    Netbeans, Software

Proudly Powered by WordPress