Tag Archives: java

How to Fix the “Invalid jdkhome” Error Message on NetBeans Load Tips, Tricks and Tutorials 16 OCT 2014

For NetBeans IDE users: Whenever you upgrade/downgrade your JAVA installation, more often than not you will encounter an error message when firing up NetBeans that essentially complains about not being able to locate the JAVA installation in the specified jdkhome variable:

netbeans invalid jdkhome specified error screenshot

(Note, selecting the Yes option will work 9 out of 10 times, unless of course you have completely uninstalled JAVA from your system).

It turns out that to fix this invalid jdkhome error is pretty easy. First, navigate to your NetBeans installation folder which by default should be “C:\Program Files\NetBeans 8.0” and look for the folder “etc”. Inside that folder should be a file with the name “netbeans.conf”. What you need to do is to open the file with your favorite text reader (notepad as an example) and look for the line that starts with netbeans_jdkhome=.

IMPORTANT: You might need administrative rights to save changes to this file. In that case, first open your text editor by right-clicking on the text editor icon and selecting the Run as Administrator option. (This is assuming that you are using Windows)

The next step is to alter the line to point to the currently installed JAVA JDK version. It should look something like this netbeans_jdkhome=”C:\Program Files\Java\jdk1.8.0_20″. If you are unsure as to which JDK version you currently have installed, navigate to your java’s installation folder (the default path is C:\Program Files\Java) and look for relevant JDK folder there.

Save the changes, and restart NetBeans.

edit netbeans.conf to fix jdkhome error

Simple as that.

How to Quickly Increase or Descrease the Font Size in NetBeans IDE CodeUnit 16 OCT 2012

NetBeans IDE lets you quickly and easily develop Java desktop, mobile, and web applications, while also providing great tools for PHP and C/C++ developers. It is free and open source and has a large community of users and developers around the world.

Quite by accident (and a little annoyingly), I discovered that there is a nifty little “shortcut” to increase or decrease the text size in the Java-powered NetBeans IDE, basically the ability to zoom in and zoom out on your code.

To do this, simply hold down the Ctrl button and scroll with the mouse wheel – essentially the same trick you would use to zoom in or zoom out of a web page using any modern browser.

Useful in a way I guess.

[UPDATE] NetBeans 7.2 changes the behaviour slightly – now you need to initiate a press down click on the scroll wheel whilst scrolling to increase/decrease the font size. No keyboard assistance required!]

Anyway, if you want to make more permanent changes to your default font, font size and color scheme, you could always just open up the Tools -> Options -> Fonts & Colors menu…

(Also, if you want to disable this functionality in the IDE, simply go to Tools -> Options -> Keymap and change the entries under Zoom Text In and Zoom Text Out actions.)

How to Install NetBeans 7.0.1 in Ubuntu 11.10 CodeUnit 23 NOV 2011

I quite enjoy using the free to use NetBeans as my PHP editor/IDE of choice, more info on which can be found at the offical website: http://netbeans.org/. This is a quick step through of how to install the latest stable version of NetBeans, i.e. 7.0.1, into your Ubuntu desktop.

Disappointingly, NetBeans isn’t included in the new fancy Ubuntu Software Center, so let’s just grab it as if we were using any old Linux installation. First, browse to the official NetBeans download page at http://netbeans.org/downloads/index.html

Select the IDE language and Platform you need NetBeans for (in this case obviously we need the Linux (x86/x64) version), and then select the initial supported technologies version you require from the download table. In my case I only need the PHP version, so I click on the 41 MB download under the PHP column.

Once the download of the .sh file is complete, open up a terminal and browse to your Downloads folder (In my case, the download was saved as netbeans-7.0.1-ml-php-linux.sh). Now to launch the install process:

sudo bash netbeans-7.0.1-ml-php-linux.sh

After entering in your administrative password, the NetBeans installer dialog will launch. Follow the prompts as you normally would for any other installer, and voilà, you’ll now find the NetBeans 7.0.1 launcher sitting under the Programming menu in the main Applications menu – if you aren’t using the new Unity menu system of course. If you are, then simply search for NetBeans and you’ll be good to go! ;)