No se pudo encontrar la biblioteca JUnit 4 en la plataforma de destino; necesita instalar JUnit (Plataforma Netbeans)

After running Netbeans 7.1.1 for some time suddenly all imports from org.junit.* are missing and I can't build the project anymore. Even though the plugin JUnit seems to be installed correctly. When I click to automatically resolve missing dependencies in Unit Test Libraries I get following error:

Could not find the JUnit 4 library in the target platform; you need to install JUnit

On other Linux machine with Netbeans 7.1 the very same project runs without any problems. It's quite strange that the library is called "org.netbeans.libs.junit4" instead of "JUnit 4" and the whole package seems to be empty.

preguntado el 28 de agosto de 12 a las 12:08

1 Respuestas

The problem was caused by installing Netbeans with sudo comando en /usr/local/netbeans*. JUnit is installed afterwards and even though is the installation seems to be completed successfully, some are probably not copied, or not readable.

When Netbeans are installed into user's home directory everything is OK. It seems to be a Netbeans bug which hasn't been solved since 6.9

Respondido el 10 de Septiembre de 12 a las 15:09

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.