Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change default JDK in NetBeans 8

I've been running NetBeans 8.0.2 on 64-bit Windows 7 with JDK 1.7.0_51 for some time. I recently installed JDK 1.7.0_79 and added it as a new platform in NetBeans. I would like that to also be the Default JDK, but the old way of accomplishing that - changing the netbeans_jdkhome reference in C:\Program Files\NetBeans 8.0\etc\netbeans.conf - no longer works. I've searched high and low for some other configuration file that contains a reference to the 1.7.0_51 JDK, but have been unable to find any.

like image 629
Kevin Rahe Avatar asked Oct 19 '22 13:10

Kevin Rahe


1 Answers

The original method of updating C:\Program Files\NetBeans 8.0\etc\netbeans.conf to reference a new JDK continues to work. What might be happening if it appears not to is Windows holding onto two separate copies of the file - the original version and the one modified to reference the new JDK, with NetBeans reading the original version. This can happen if you try to edit netbeans.conf when the editor you use to update it is not running with Administrator privileges. This is bizarre, confusing and I dare say dangerous behavior on the part of Windows. It might even be a bug.

like image 117
Kevin Rahe Avatar answered Oct 27 '22 11:10

Kevin Rahe