Tengo problemas para ejecutar un reporte
[java]
try {
JasperCompileManager.compileReportToFile(this.getC lass().getResource("/mvc/model/Factura.jrxml").getFile());
URL urlc = this.getClass().getResource("/mvc/model/Factura.jasper");
JasperReport masterReport = null;
try {
masterReport = (JasperReport) JRLoader.loadObject(urlc);
}catch (JRException ex) {
System.out.println("Error cargando el reporte maestro: " + ex.getMessage());
System.exit(3);
}
Map masterParams = new HashMap();
masterParams.put("numero",valor);
masterParams.put("iva",String.valueOf(iva));
JasperPrint masterPrint = null;
try {
masterPrint = JasperFillManager.fillReport(masterReport,masterPa rams,con);
JasperViewer.viewReport(masterPrint, false);
} catch (JRException e) {
System.out.println("problema al imprimir"+e);
}
[/java]
java.io.IOException: Cannot run program "javac": CreateProcess error=2, El sistema no puede hallar el archivo especificado
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at net.sf.jasperreports.engine.design.JRJavacCompiler .compileClass(JRJavacCompiler.java:59)
at net.sf.jasperreports.engine.design.JRAbstractClass Compiler.compileReport(JRAbstractClassCompiler.jav a:106)
at net.sf.jasperreports.engine.design.JRDefaultCompil er.compileReport(JRDefaultCompiler.java:106)
at net.sf.jasperreports.engine.JasperCompileManager.c ompileReportToFile(JasperCompileManager.java:127)
at net.sf.jasperreports.engine.JasperCompileManager.c ompileReportToFile(JasperCompileManager.java:86)
at mvc.model.GenerarReporte.generarFactura(GenerarRep orte.java:34)
at mvc.controller.TramiteAction.registrarTramite(Tram iteAction.java:120)
at mvc.vistas.FrameTramite.jButton_(FrameTramite.java :542)
at mvc.vistas.FrameTramite$6.actionPerformed(FrameTra mite.java:532)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown Source)
at javax.swing.AbstractButton$Handler.actionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(Unknown Source)
at com.jtattoo.plaf.BaseButtonListener.mouseReleased( Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent( Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=2, El sistema no puede hallar el archivo especificado
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 38 more
NESTED BY :
java.io.IOException: Cannot run program "javac": CreateProcess error=2, El sistema no puede hallar el archivo especificado
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at net.sf.jasperreports.engine.design.JRJavacCompiler .compileClass(JRJavacCompiler.java:59)
at net.sf.jasperreports.engine.design.JRAbstractClass Compiler.compileReport(JRAbstractClassCompiler.jav a:106)
at net.sf.jasperreports.engine.design.JRDefaultCompil er.compileReport(JRDefaultCompiler.java:106)
at net.sf.jasperreports.engine.JasperCompileManager.c ompileReportToFile(JasperCompileManager.java:127)
at net.sf.jasperreports.engine.JasperCompileManager.c ompileReportToFile(JasperCompileManager.java:86)
at mvc.model.GenerarReporte.generarFactura(GenerarRep orte.java:34)
at mvc.controller.TramiteAction.registrarTramite(Tram iteAction.java:120)
at mvc.vistas.FrameTramite.jButton_(FrameTramite.java :542)
at mvc.vistas.FrameTramite$6.actionPerformed(FrameTra mite.java:532)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown Source)
at javax.swing.AbstractButton$Handler.actionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(Unknown Source)
at com.jtattoo.plaf.BaseButtonListener.mouseReleased( Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent( Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(U nknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unkno wn Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilter s(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(U nknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.io.IOException: CreateProcess error=2, El sistema no puede hallar el archivo especificado
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 38 more