Running with PJA toolkit

When there is neither X Window, nor XVFB available, a PJA (Pure Java AWT) Toolkit is supported to run JReport Enterprise Server. This is a Java library for drawing graphics developed by eTeks. It supplies a replacement AWT toolkit and eliminates the requirement of an X display. To use it:

  1. Install PJA. The PJA package is not included in our product, go to http://www.eteks.com/pja/en/ to download PJA and install it.
  2. Install JReport Enterprise Server.
  3. Assuming that EntSvrSetup.sh has been used to install JReport Enterprise Server on a Non-GUI platform, modify the file JREntServer.sh in <install_root>\bin by appending /pja_2.4/lib/pjatools.jar to the class path, and add the following options.

Below is an example of the modified file JREntServer.sh that is used to start up JReport Enterprise Server:

#!/bin/sh
CLASSPATH=$REPORTHOME/lib/commons-net-ftp-2.0.0.jar:
$REPORTHOME/lib/sac.jar:$REPORTHOME/lib/servlet.jar:
$REPORTHOME/lib/ant.jar:$REPORTHOME/lib/jasper-compiler.jar:
$REPORTHOME/lib/jasper-runtime.jar:$REPORTHOME/lib/JREngine.jar:
$REPORTHOME/lib/JRESServlets.jar:$REPORTHOME/lib/JREntServer.jar:
$REPORTHOME/lib/maintain.jar:$REPORTHOME/lib/mail-1.4.jar:
$REPORTHOME/lib/activation-1.1.jar:$REPORTHOME/lib/JRWebDesign.jar:
$REPORTHOME/lib/itext.jar:$REPORTHOME/lib/poiHSSF_151.jar:
$REPORTHOME/lib/xercesImpl.jar:$REPORTHOME/lib/xml-apis.jar:
$REPORTHOME/lib/hsqldb.jar:$REPORTHOME/lib/tar.jar:
$REPORTHOME/lib/jai_core.jar:$REPORTHOME/lib/jai_codec.jar:
$REPORTHOME/lib/commons-codec-1.2.jar:$REPORTHOME/lib/log4j-1.2.8.jar:
$REPORTHOME/lib/jsch-0.1.30.jar:$JAVAHOME/lib/tools.jar:$ADDCLASSPATH

cd $REPORTHOME/bin
$JAVAHOME/bin/java -Dawt.toolkit=com.eteks.awt.PJAToolkit
-Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment 
-Djava2d.font.usePlatformFont=false 
-Djava.awt.fonts=/usr/j2se/jre/lib/fonts:
/JREntServer/font:/usr/openwin/lib/X11/fonts/TrueType
-Dinstall.root=$REPORTHOME/ -Djreport.url.encoding=UTF-8 -Xmx512m 
-Dreporthome=$REPORTHOME jet.server.JREntServer "$@"

Notes:

Related topics: