Recientemente hice un proyecto de Netbeans y estoy usando SVN junto con él. Estoy viendo el error de clase duplicado, y en la consola que dicemétodo debe llamar al error super() en Netbeans
java.lang.VerifyError: (class: pie/chart/explorer/PieChartExplorer, method: <init> signature:()V) Constructor must call super() or this()
Could not find the main class: pie.chart.explorer.PieChartExplorer. Program will exit.
Exception in thread "main" Java Result: 1
Aquí es PieChartExplorer.java:
package pie.chart.explorer;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class PieChartExplorer extends JFrame implements ActionListener {
JTextField one = new JTextField(10);
JTextField two = new JTextField(10);
JTextField three = new JTextField(10);
JButton sub = new JButton("Click to be amazed");
public PieChartExplorer() {
super("Pie Chart Explorer");
setSize(300,100);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
FlowLayout flo = new FlowLayout();
setLayout(flo);
setVisible(true);
add(one);
add(two);
add(three);
sub.addActionListener(this);;
add(sub);
}
public static void main(String[] args) {
PieChartExplorer app = new PieChartExplorer();
}
@Override
public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
if(source == sub) {
try {
Pie show = new Pie(Float.parseFloat(one.getText()),Float.parseFloat(two.getText()),Float.parseFloat(three.getText()));
} catch(Exception ex) {
JOptionPane.showMessageDialog(this, "Please check entered data");
}
}
}
}
que he intentado:
- Limpiar y Reconstruir proyecto
- Asegurándome de haber llamado super en todos los constructores
¿Cómo se puede reparar? Code for download.
¿Puede pasada mensaje de error completo? ¿Hay algún archivo, clase o información de línea? –
@eyazici Incluí el mensaje de error en mi edición. Mire la información actualizada –
@Andrew: el error que publicó parece un error de tiempo de ejecución. ¿Estás obteniendo errores de compilación? Publique detalles sobre el error de "clase duplicada" que ha mencionado. – Gabe