0
I’m doing a college project, and every class I put together to inherit from the class Modelo
, I get these mistakes.
/home/tavz-correia/Netbeansprojects/exercicio01/Acessoriosparaveiculos/nbproject/build-impl.xml:930: The following error occurred while executing this line:
/home/tavz-correia/Netbeansprojects/exercicio01/Accessoriesapples/nbproject/build-impl.xml:270: Compile failed; see the Compiler error output for Details.
Class Modelo.java
:
package acessoriosveiculos;
import java.io.FileReader;
import java.util.List;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
/**
*
* @author tavz-correia
*/
public class Modelo {
private List<String> modelos;
public Modelo() throws Exception{
List<String> lista = ler("/home/tavz-correia/NetBeansProjects/exercicio01/AcessoriosVeiculos/src/acessoriosveiculos/ObjetosSerializados/Modelos.ser");
this.setModelos(lista);
}
public List<String> getModelos() {
return modelos;
}
public void setModelos(List<String> modelo) {
this.modelos = modelo;
}
@SuppressWarnings("unchecked")
public List<String> ler(String caminho) throws Exception {
JSONParser parser = new JSONParser();
FileReader arquivo = new FileReader("/home/tavz-correia/NetBeansProjects/exercicio01/AcessoriosVeiculos/src/acessoriosveiculos/ObjetosSerializados/Modelos.json");
JSONObject jsonObject = (JSONObject) parser.parse(arquivo);
List<String> lista = (List<String>) jsonObject.get("modelos");
return lista;
}
}
Could someone help me?
Delete everything contained in the netbeans folder within . cache ?
– Otávio Correia
Yeah, you can try that. If you want to make sure you’re not doing anything stupid, just rename it to something else. Erasing it once and for all if you’re firm on your decision or going back to your old name if you think it won’t help.
– Victor Stafusa