E ai pessoal.
Estou com um problema com minhas 2 classes para relatório.
Ele está me passando essa mensagem ai ao compilar:
java.lang.VerifyError: Cannot inherit from final class
Minhas 2 classes, primeiro a que cria o Frame:
[code]package digitacoes;
import com.crystaldecisions.reports.sdk.;
import com.crystaldecisions.sdk.occa.report.lib.;
import com.crystaldecisions.ReportViewer.*;
import java.awt.;
import java.awt.event.;
import javax.swing.*;
public class ReportViewerFrame extends JFrame {
private int XPOS = 75;
private int YPOS = 50;
private int larg = 750;
private int alt = 600;
//Crystal Report thick-client viewer object that will be embedded into the JFrame.
private ReportViewerBean reportViewer = new ReportViewerBean();
//This report will be viewed in the thick-client viewer.
private ReportClientDocument reportClientDoc = new ReportClientDocument();
/**
* Constructs and launches the new frame.
*/
public ReportViewerFrame(ReportClientDocument reportClientDoc) throws Exception {
//Initialize frame properties.
this.setResizable(true);
this.setLocation(XPOS, YPOS);
this.setSize(larg, alt);
this.setTitle("Crystal Report Java Viewer");
//Add GUI components to the frame including the ReportViewerBean.
addComponents();
//Add GUI listeners to the frame.
addListeners();
//Set the report that the ReportViewerBean will display.
this.reportClientDoc = reportClientDoc;
reportViewer.setReportSource(reportClientDoc.getReportSource());
reportViewer.init();
reportViewer.start();
//Display the frame.
this.setVisible(true);
}
private void addComponents() {
//Create new panel and add the ReportViewerBean to it.
Container cp = getContentPane();
cp.setLayout(new BorderLayout());
cp.add(reportViewer);
}
private void addListeners() {
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
quit();
}
});
}
public void quit() {
try {
//Release report.
reportClientDoc.close();
System.exit(0);
}
catch(ReportSDKException ex) {
ex.printStackTrace();
}
}
}[/code]
E AGORA A CLASSE QUE EXECUTA.
[code]package digitacoes;
import com.crystaldecisions.reports.sdk.;
import com.crystaldecisions.sdk.occa.report.lib.;
import java.awt.Color;
import javax.swing.*;
public class JRCViewReport {
public static String REPORT_NAME = "D:\\Java\\Projetos\\RPT\\Report1.rpt";
public static void launchApplication() {
try {
ReportClientDocument reportClientDoc = new ReportClientDocument();
reportClientDoc.open(REPORT_NAME, 0);
new ReportViewerFrame(reportClientDoc);
}
catch(ReportSDKException ex) {
System.out.println(ex);
}
catch(Exception ex) {
System.out.println(ex);
}
}
public static void main(String [] args) {
//Event-dispatching thread to run Swing GUI. This is good practice for Swing applications
//to help ensure that events are dispatched in a predicatable order.
//For more information on using this method, refer to the SUN site below for more details:
//http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html
SwingUtilities.invokeLater(new Runnable() {
public void run() {
//Hand-off to worker function to start application.
launchApplication();
}
});
}
}[/code]
Se alguem me tirar desse aperto valeu galera.