Results 1 to 7 of 7
  1. #1
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default Problem with .jar iReport (library ?)

    Please see this thread: problem with .jar in iReport

    I created a project which will use iReport. I have tested this inside and outside netbeans
    (same machine) and it works fine. BUT when I try to run it on another machine the report wont
    load. On the linked thread makpandian told me that maybe its I am missing a library so we fix
    it but still same error shows. And he told me that maybe it is because of classpath problem.

    Java Code:
    [b][u]ERROR MESSAGE:[/u][/b]
    net.sf.jasperreports.engine.JRException: Error compiling report java
        source files : [b]D:\Costing\RptCosting_1288072391310_955208.java[/b]
            at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses
                                                        (JRJavacCompiler.java:89)
            at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits
                                                        (JRAbstractClassCompiler.java:63)
            at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport
                                                            (JRAbstractCompiler.java:188)
            at net.sf.jasperreports.engine.JasperCompileManager.compileReport
                                                    (JasperCompileManager.java:215)
            at net.sf.jasperreports.engine.JasperCompileManager.compileReport
                                                    (JasperCompileManager.java:148)
            at Costing.FrmCostingReport$showReport.doInBackground
                                                    (FrmCostingReport.java:104)
            at Costing.FrmCostingReport$showReport.doInBackground
                                                    (FrmCostingReport.java:95)
            at javax.swing.SwingWorker$1.call(Unknown Source)
            at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
            at java.util.concurrent.FutureTask.run(Unknown Source)
            at javax.swing.SwingWorker.run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: Cannot run program "javac": CreateProcess
                                    error=2, The system cannot find the file specified
            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.compileClasses
                                                            (JRJavacCompiler.java:58)
            ... 13 more
    Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the
                                                                        file specified
            at java.lang.ProcessImpl.create(Native Method)
            at java.lang.ProcessImpl.<init>(Unknown Source)
            at java.lang.ProcessImpl.start(Unknown Source)
            ... 17 more
    Java Code:
    [b][u]CLASSPATH FROM Manifest.MF:
    [/u][/b]
    Class-Path: 
     lib/AbsoluteLayout.jar 
     lib/barbecue-1.5-beta1.jar 
     lib/barcode4j.jar
     lib/batik-anim.jar 
     lib/batik-awt-util.jar 
     lib/batik-bridge.jar 
     lib/batik-css.jar 
     lib/batik-dom.jar 
     lib/batik-ext.jar 
     lib/batik-gvt.jar 
     lib/batik-parser.jar 
     lib/batik-script.jar 
     lib/batik-svg-dom.jar 
     lib/batik-svggen.jar 
     lib/batik-util.jar 
     lib/batik-xml.jar 
     lib/bsh-2.0b4.jar 
     lib/castor-1.2.jar 
     lib/cglib-2.2.jar 
     lib/commons-beanutils-1.8.0.jar 
     lib/commons-collections-3.2.1.jar 
     lib/commons-digester-1.7.jar 
     lib/commons-logging-1.1.jar 
     lib/groovy-all-1.5.5.jar 
     lib/itext-2.1.7.jar 
     lib/jakarta-bcel-20050813.jar 
     lib/jasperreports-3.7.4.jar 
     lib/jasperreports-applet-3.7.4.jar 
     lib/jasperreports-dejavu-fonts.jar 
     lib/jasperreports-fonts-3.7.4.jar 
     lib/jasperreports-javaflow-3.7.4.jar 
     lib/jaxen-1.1.1.jar 
     lib/jcommon-1.0.15.jar 
     lib/jfreechart-1.0.12.jar 
     lib/jpa.jar 
     lib/jxl-2.6.jar 
     lib/mysql-connector-java-5.1.12-bin.jar 
     lib/org-netbeans-modules-java-j2seproject-copylibstask.jar 
     lib/png-encoder-1.5.jar 
     lib/poi-3.2-FINAL-20081019.jar 
     lib/rhino-1.7R1.jar 
     lib/spring.jar 
     lib/toplink-essentials-agent.jar 
     lib/toplink-essentials.jar 
     lib/xalan.jar 
     lib/xercesImpl.jar 
     lib/xml-apis-ext.jar 
     lib/xml-apis.jar

    Thanks,
    geje

  2. #2
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default

    I have solved the problem when I set the java in environment variable.

    Right Click My Computer>[b]properties[\b]>[b]advance[\b]>
    [b]environment variables[\b]>at system variables choose [b]Path[\b]> then add
    C:\Program Files\Java\jdk1.6.0_18\bin\;

    Do I have to set these to run java applications?

  3. #3
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default

    I have solved the problem when I set the java in environment variable.

    Right Click My Computer > properties > advance >
    environment variables>at system variables choose Path> then add
    C:\Program Files\Java\jdk1.6.0_18\bin\;

    Do I have to set these to run java applications?

  4. #4
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default

    sorry for double post/reply... I just click edit, change make some words bold then click save but it created new reply

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,792
    Rep Power
    19

    Default

    You need that to compile the java code.
    You need a jre (that JDK will do as well) to run it...that's where the"java" command is.

  6. #6
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default

    I have installed jdk and jre on the machine but after installing these it does not automatically set in environment variable. Everything runs OK except report (iReport) it does not load and it is looking for .java (i think it is a compiled .java, it is on my first post), after I set the environment variable, iReport load already. Now I am thinking that it is an iReport bug because only report has a problem.

    Thanks,
    geje

  7. #7
    mine0926 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philippines
    Posts
    580
    Rep Power
    5

    Default

    I re-read my post#2/#3 and my question was
    Quote Originally Posted by mine0926 View Post
    Do I have to set these to run java applications?
    What I mean was, do I have to set java in environment variable to load iReport in a java application?

Similar Threads

  1. problem with .jar in iReport
    By mine0926 in forum New To Java
    Replies: 10
    Last Post: 02-06-2014, 09:42 AM
  2. Replies: 6
    Last Post: 08-19-2010, 01:54 PM
  3. missing dates problem in ireport
    By javastuden in forum Advanced Java
    Replies: 0
    Last Post: 12-18-2009, 05:11 AM
  4. ireport problem on print
    By urtley in forum Advanced Java
    Replies: 0
    Last Post: 08-05-2009, 11:12 PM
  5. Problem for iReport (Data Source )
    By tlgkumar in forum Advanced Java
    Replies: 1
    Last Post: 11-27-2007, 07:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •