Ubuntu: Netbeans 7.0.1 error on Precise



Question:

Today, I installed openjdk and netbeans packages on my ubuntu 12.04 notebook from the synaptic package manager to learn some java. javac (compiler) and jvm are working fine. However, when I add a JFrame to my netbeans projec, I get this error inside the generated code itself:

package org.jdesktop.layout does not exist.  

However, when I browse the netbeans installation at /usr/share/netbeans/7.x.x/platforms/modules folder, the said package does exist there.

How do I tell netbeans to find the packages there? The above package folder already exists in netbeans search path. I verified this from the Tools=>Netbeans platforms menu.

UPDATE: I added a library reference to "Swing Layout Extensions". After that, the said errors went away, but the designer still doesn't work!! It is stuck with a "Loading..." on the window and no controls could be drag-dropped.


Solution:1

I found the answer myself after a bit of googling. In case it helps someone, I'm posting this here. This is a known netbeans bug on debian based systems.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653915

If the designer is stuck with a "Loading.." status, you may workaround this problem without installing additional packages by starting netbeans with these parameters as a poster suggests:

netbeans -cp:a /usr/share/java/xercesImpl.jar


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »