user1802412
user1802412

Reputation: 53

Error Using Java Class in iReport

I created a Java method and I want to call it from a report, like this:

package javafunct;

public class Main {

    public String getTes(){
         return "it work";
    }   
}

I want to show that result in my JR report, so I put that on a textField with expression:

new javafunct.Main().getTes()

I compiled that, and then I set that jar file to the iReport classpath and my PHP code.

When I run it from iReport, it works, but when I run from PHP to open this report, it does not work. The error is:

Error evaluating expression :

Source text : new javafunct.Main().getTes() 

Upvotes: 1

Views: 229

Answers (1)

user1802412
user1802412

Reputation: 53

ok,i solved my problem.. i must put javaFunct.jar to folder javaBridge/WEB-INF/lib in my tomcat and then restart tomcat.

Upvotes: 2

Related Questions