# "NPT Error: Cannot open library" when debugging in Netbeans



## ddaley (May 23, 2012)

I have installed the latest Open JDK 6 and Open JDK 7 on a fresh install of FreeBSD 9 (I had the same issue under FreeBSD 8.2 as well).  I installed the latest Netbeans (7.1.1) from ports.

Netbeans runs fine when I run using Open JDK 6.  When I set the JAVA_VENDOR and JAVA_VERSION to use 7 and update the jdk home in the netbeans.conf to use 7, then Netbeans runs, but I cannot debug java apps.  When I attempt to debug a java application, I get 
	
	



```
NPT Error: Cannot open library.
```
  Netbeans can run apps just fine, it just cannot debug.

Anyone having any ideas on what this error means?


----------



## YZMSQ (May 25, 2012)

I just encountered the similar problem while I was about to do some debug work using jdb command right now, and after googling about it, I still got no clue that how to tackle it.x(


----------



## YZMSQ (May 25, 2012)

I just found a workaround here, and have tested it, which works flawlessly now.


----------



## ddaley (May 29, 2012)

Thanks.  This worked for me.


----------

