Jump to content
Changes to the Jaspersoft community edition download ×

Run Jasper reports on Linux

2004 IR Help

Recommended Posts

By: InpreetSingh - inpreet

Run Jasper reports on Linux

2005-04-13 05:43


I read all previous forum threads under jasper reports regarding installation jasper reports on linux. But still I have some queries regarding running jasper reports.

What I under stood:

1. We 1st have to write .java file which we have to compile using java complier which will result in .jar file.

2. We have to supply jasper an xml file which will explain design of our report.


My queries:

1. How should we compile .java file?

I made one TestJasper.java file in main directory(jasperreports-0.6.2). Then I tried to compile using javac compiler on linux but unable to compile.

(/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/java/) This is the directory which contain java files like applet, awt, beans, io, lang, math, net, rmi, security, sql, text, util. I copied my jasperreports directory which contain ant, engine, view into this directory so that I don't have to include all this under CLASSPATH while compiling. So this means now java directory contain all jasper base classes also. Now when I compiled it shows


[root@linux jasperreports-0.6.2]# /usr/java/j2sdk1.4.2_06/bin/javac -classpath TestJasper TestJasper.java


TestJasper.java:1: package java.jasperreports.engine does not exist

import java.jasperreports.engine.*;

TestJasper.java:2: package java.jasperreports.engine.export does not exist

import java.jasperreports.engine.export.*;

TestJasper.java:3: package java.jasperreports.engine.util does not exist

import java.jasperreports.engine.util.*;

TestJasper.java:4: package java.jasperreports.view does not exist

import java.jasperreports.view.*;


Why its refusing to import classes under jasperreports where as it is importing java.util.*, java.sql.*, java.io.*, java.awt.* successfully?


If at all it successfully compile this file, what should be my second step?

I am totally confused, please help.



Inpreet Singh





By: CleverFool - cleverfool

RE: Run Jasper reports on Linux

2005-04-14 01:23

Are you completely new to java?


First. This directory "/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/java/" contains files for GCJ not for JAVAC. So javac takes NOTHING from there.


Second. Javac not compiles "java" files into "jar" files. It compiles them to "class" files. And then if you want you can create "jar" archive.


Third. There is no such packacge as "java.jasperreports.engine" in JasperReports.


Finally it is too long to explain how java is working. So first - read some book about java or if you don't have a lot of time Sun java tutorial here: http://java.sun.com/docs/books/tutorial/

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...