Netbeans cached a deleted class and does not recognize another class [closed]

-2

I have different packages in my project, and by mistake, I ended up creating two classes with the same name, let's assume Student.java, but in different packages.

I deleted one of them, and even after clearing the Netbeans cache, it no longer finds the Student.java class left in the project.

It does not suggest it in the autocomplete of "import br.com.meuproject.util [...]" and even after clearing the IDE's cache, I still can not import the class.

EDIT : Better illustrating the problem. Have an abstract class Student.java and want to extend classes from it. It turns out that, by mistake, I ended up creating another class called Student.java in another project package.

I deleted this second class created by mistake, but Netbeans seems to me to have understood no reference to Aluno.java, ie the first class Aluno.java of the project still exists but when I add in my project an "extends Student ", it does not find within this project this class and in the class's import list," import br.com.myuproject.util "shows Warning, even though this is the correct path from where the abstract class is. As a test, I created an abstract class NewAluno.java, and he understood it perfectly.

  • I tried to clean the Netbeans v8.1 cache by deleting the /Cache/8.1 folder that is, but did not work.

  • I deleted my project from the machine, deleted the folder again, rebooted the machine, re-cloned the project, and still can not understand the reference.

Now I've uninstalled Netbeans, I'll restart the machine and install Netbeans again. I hope this way the IDE cache will be properly cleaned, since all other attempts were flawed.

EDIT 2 : Worse still uninstall. Netbeans does not delete all the folders and files it uses. I'm trying to reinstall but has now locked the installation and will not. It was stopped at 0%. That is, if the bug bugged, it will be bugada forever rs. It does not work, it does not work because it still does not delete everything from your computer and try to install it even worse, because it gets stuck and it will not. / p>

EDIT 3 : Source code as requested. The code is a JFrame class that extends the abstract class Aluno.java. I'm doing a Java Swing project, and the abstract class Aluno.java brings some important definitions to the project and by default, I need the JFrame screens to extend from Student.java. If I create a NewAluno.java class, Netbeans understands the existence of this class normally (or rather, I understood ... because now I uninstalled, it got worse, I'm not working, I wrote it there in EDIT 2 above). But I can not refactor all the screens to be extended from NewAluno.java, because the problem is clearly on my machine since my colleagues in the project had no problem with that. I need some way that makes Netbeans re-see the existence of the original Alumni class.

package br.com.meuprojeto.views;

/*A classe existe neste caminho, porém fica com warning no import,
 e como solução o Netbeans oferece: 'Importar de excluido'*/

import br.com.meuprojeto.util.Aluno; 
import javax.swing.ImageIcon;
import org.json.JSONObject;

public class Janela1 extends Aluno{

/**
 * Creates new form Janela1
 */
public Janela1() {
    initComponents();
}
    
asked by anonymous 26.10.2016 / 20:06

1 answer

2

The solution I had to the Netbeans cache problem was:

  • Uninstalling Netbeans

  • Delete the Netbeans directories in C: \ Users \ user \ AppData \ Roaming and C: \ Users \ user \ AppData \ Local

  • Delete the .nbi and .netbeans-derby folders in C: \ Users \ user, and delete the C: \ Program Files \ NetBeans 8.1 folder

  • Reinstalling Netbeans

27.10.2016 / 15:12