Using linux environment variables

kclarkkclark BIRT GuruEM
edited November 2013 in DevShare Downloads
A lot of Linux users have grown to love environment variables, they make coding faster with less keystrokes. The following code will show you how to call $HOME and display it in lblPath.
importPackage(Packages.java.lang);
temp = System.getenv("HOME");
reportContext.getDesignHandle().findElement("lblPath").text = temp


There are two things to remember. Packages.java.lang is required and the leading $ for your environment variable is not required for System.getenv().

Kristopher Clark

Actuate Corporation – The BIRT Company™

http://www.actuate.com | http://birtondemand.com

 

My Blog

Twitter

LinkedIn
Facebook
 

Sign In or Register to comment.