Chart FX for Java Licensing
The licensing scheme for Chart FX for Java requires a license file that is read by the chartfx.jar file before the server will generate a chart. When Chart FX for Java is used in a webserver, this license file, cfxjava.lic file, must be located in the server or computer running the application.
Before your installation of Chart FX for Java is complete, the product must be activated. If you are using the install program and your server has internet access, this process is automated. However, if you are manually installing or your server does not have internet access, you will need to manually activate the license. See later in this section for the different procedures to activate the license.
License and Config File Allowable Locations
In order to improve upon the license authentication methods in the previous version of Chart FX for Java the developers added the possiblity to store the cfxjava.lic and ChartFX.Internet.config files in any of the locations mentioned below. The internal Chart FX authentication methods will check, in order, each of these locations for the required license and config files.
1) WEB-INF\lib - This directory is found in your web application's folder
2) chartfx62\config - This directory is also found in your web application's folder
3) \chartfx62\config - This directory is located in your general webapps folder that houses your various web application folders. Use this option if you have multiple web applications that require Chart FX licensing.
4) Same location your web server stores its .jar files. In Tomcat 5.5 this is the server\lib folder. This option is also useful if a server hosts multiple charting applications.
- OR -
You have the option to hardcode the location of these files via the setConfigPath() function of the Chart object.
chart1.setConfigPath("c:\\myConfigFiles")
This option is useful in a webfarm environment when applications are replicated across servers and multiple licenses are required.
Important Note: If you set the config path in your code, then Chart FX will not search the above directories for the license and config files. So you must ensure these files are in the location specified.
Additional Note: If, for example, you store your license and config files in the location specified in option #4 and the license and config files are updated, then, if Chart FX finds license and config files in the location for option #1, you will experience errors. Please only utilize one of these locations to store your license and config files.
Installation via Chart FX for Java Installer
The installer program will create the following directory structure at the path configured in the installation program:
- The designer directory contains all the components required to run the Chart FX for Java Designer.
- The doc directory contains Chart FX for Java Resource center, including the Programmer’s Guide and JavaDoc API Reference.
- The samples directory contains all the components required for the server installation (Chart FX for Java server-side Java bean, license file, etc.). Also included in this folder are the samples and sample data.
- The plugins directory contains the Eclipse and NetBeans plugins.
- The UnistallerData directory contains all the information required to uninstall Chart FX for Java.
Note: The Chart FX for Java installer program is provided in three different forms: Trial, Development and Production. When installed on a server with internet access, all of the necessary activation is completed automatically. Simply create your web application directory, place the required files in the proper directory structure and start your server. Also, the Production installation does not include the designer, documentation or samples.
Designer Installation
The Designer component of Chart FX for Java does not require activation; however, you must place the following files in the same directory for the designer to function correctly:
- chartfx.jar
- chartfx.designer.jar
- jai_codec.jar, jai_core.jar may be necesary if you don't have them as part of your Java jdk installation.
Please see the Designer section for more information.
Documentation Installation
The doc directory contains all the Chart FX for Java documentation. The Programmer’s guide as well as the JavaDoc API Reference has been generated in html format. Users may browse the docs by simply pointing their browser to the index file of the doc folder (i.e. C:\Program Files\cfxjava\doc\index.htm). For your convenience, a shortcut to the Chart FX for Java Resource Center is included in the start menu of the installation in Windows computers.
Server Installation
The Server directory contains all the components necessary to create the server installation. To complete the server installation:
- Copy the contents of this directory.
- Create a directory in your web application folder (i.e. cfxjava).
- Save the directory structure from the Server folder to the new cfxjava folder.
- Restart the web server.
Depending on the Web Server you are using, the web application directory can vary. In this example we are using Tomcat 5.5. Tomcat’s default web application directory is called "webapps". To install Chart FX for Java on this web server, we created a directory called "cfxjava" beneath the webapps directory. Then we copied the contents of the Server directory into the new cfxjava directory as depicted in the next image:

Once this has been completed, restarting the web server will load all the required components into memory. At this point Chart FX for Java is properly installed and ready to start generating charts.
Chart FX for Java Server Components
The Chart FX for Java server components consist of the following files:
- chartfx.jar
- cfxjava.lic
- ChartFX.Internet.config
- chartfx.annotation.jar
- chartfx.map.jar
- chartfx.polar.jar
- jai_codec.jar
- jai_core.jar
The chartfx.jar is the Chart FX for Java core; cfxjava.lic is the license file and ChartFX.Internet.config is the configuration file. These three files are required, however they may be located in different places on the server. The chartfx.annotation.jar, chartfx.map.jar and chartfx.polar.jar are optional packages, needed only if those features are used: Annotation, Maps and Polar charts respectively.
The jar files are usually located in the web application WEB-INF\lib folder. However, they can be stored in the application server common library repository, or simply in the classpath. The license and configuration files can be stored in the location described early in this section.
Chart FX for Java requires Java Advanced Imaging API (jai_codec.jar, and jai_core.jar) may be available in your system, but for convenience we have included the jar files as well.
Temporary Files on the Server
Chart FX for Java requires a special folder to store Temporary Chart Files generated on the server: charfx62/temp. The html tag generated in the getHtmlTag method call will reference this directory in order for Charts to be displayed to users. These sub-directories are generated by the installation program. Chart FX for Java will look for the temporary directories based on the RequiredRoot Value set in the ChartFX.Internet.config file. There are 3 different settings that can be used:
- <RequiredRoot></RequiredRoot>: Leaving the RequiredRoot blank will cause Chart FX for Java to search the web server root for the Chart FX temp directories (/chartfx62/temp).
- <RequiredRoot>.</RequiredRoot>: Configuring a dot ( . ) will cause Chart FX for Java to search the Application root for the chart FX temp directories (chartfx62/temp).
- <RequiredRoot>/AlternateApp</RequiredRoot>: Configuring an alternate application is the third option. Note that a leading slash is required (/AlternateApp/chartfx62/temp).
The server will need to be configured to allow applications to access other applications for the first an third options to work, by setting the Cross Context to true.
Note: Please note that chart files will accumulate in this directory. You may periodically want to delete unused chart files from this directory. The getHtmlData method is used to BitStream chart files without saving them on the server. Please see the Chart FX for Java API reference for more information.
Download Directory for Client assemblies and ActiveX (Active Charts)
When generating Active Charts, client machines will need to download a client assembly used for viewing the charts. The download folder contains these client assemblies (.DLL) and ActiveX files (.cab).
<root> /chartfx62/download/
The client assemblies and ActiveX files are as follows, please note the exact naming convention must be used for these files:
- ChartFX.Internet.Base.DLL
- ChartFX.Internet.Client.DLL
- ChartFX.MainClient.DLL
- ChartFX.Map.Client.DLL
- ChartFX.Internet.Annotation.DLL
- ChartFX.Internet.Polar.DLL
- ChartFX.ComIEClient.Core.cab
- ChartFX.ComIEClient.Annotation.cab
As with the temporary files, Chart FX for Java use the ChartFX.Internet.config's RequiredRoot value to locate the chartfx62/download folder.
Activating Chart FX for Java
Each Chart FX for Java installation must be activated, regardless of being a trial, development or production installation. If you have Internet access and use the installer package to install the product, all the activation is completed automatically. However, if you do not have Internet access or the installer package is not used to install the software, you will manually need to activate the software.
IMPORTANT NOTE: Chart FX for Java Community Edition DOES NOT require Activation. The cfxjava.lic included in the installer is ready to be used in the local develpment application server.
Activation using the installer
After copying all files to your system, the Chart FX for Java installer will attempt to activate your copy. If activation is successful, your “.lic" file located at \server\WEB-INF\lib of the installation will be an activated license file. If the installation can not complete the activation process, a warning message will be displayed and the challenge code required for manual activation will be generated at <intallation_folder>out.txt. You will then need to access the registration website to complete the activation manually.
Activation using the Servlet
Included in the installation is a servlet to assist you in the activation process. Basically, by entering your product serial number, you will be returned a license code for that server (if the server has internet conectivity), or the challege code for the installation so you can obtain your license at http://register.softwarefx.com/licensecode/
There are 2 versions, one for Production Server (ChartFXLicGenProd.war), and another for Test Development (ChartFXLicGenDev.war) servers. The servlet is installed to a "servlet" folder at your installation location.
In order to use this servlet you will have to: 1) Deploy the servlet to the Java Server that you wish to obtain the license for. 2) Open the servlet with a web browser by going to: "http://yourserver/ChartFXLicGenProd/servlet/GenerateLicense" or "http://yourserver/ChartFXLicGenDev/servlet/GenerateLicense". 3) Follow the page instructions.
The servlet will return a License Code, which needs to be saved in the cfxjava.lic file located in the same subdirectory where chartfx.jar resides. Copy the entire License Code and replace the contents of the cfxjava.lic file with the new license code. Make sure you do not include line breaks or extra characters in the license code. Save the file.
Restarting the server will load all the required licensing information and Chart FX for Java will start producing charts.
Note: If the cfxjava.lic file does not exist on your server, you will need to create the file and place it in the same directory as chartfx.jar. Please note the same naming convention and case is required. Your original cfxjava.lic file may have some information from a previous activation or installation. If so, please overwrite the entire contents of the file with the newly obtained License Code and save.
Manual Activation
When a server does not have an internet connection or when server administrators elect to manually install the software, the Chart FX for Java product must also be manually activated. To manually activate the software, administrators must pass the serial number to the chart’s jar file to obtain a challenge code. This Challenge Code must then be registered at the Software FX website; once completed, a License Code will be returned. This License Code must be used to overwrite the contents of the existing cfxjava.lic file.
IMPORTANT NOTE: when you use the manual activation method, you must be sure you are using the same Java JVM that the application server is using. Many application servers install and use their own JVM, and if you activate Chart FX for Java using a diferent one, the Licesne will be invalid and will not work,
Here is an example of how to complete this process:
- From the command line, navigate to the /lib beneath the WEB-INF directory of the Chart FX for Java installation. Here you should find chartfx.jar and the default cfxjava.lic files. The usage for the chartfx.jar file is as follows:
Usage: java –jar chartfx.jar [-version] [-setup serialNumber]
- To obtain a challege code for the installation, you would execute the following command (where XXXXXX is your valid serial number):
java –jar chartfx.jar –setup XXXXXX
Note: It maybe useful to output the result to a text file as follows:
java –jar chartfx.jar –setup XXXXXX >challege_code.txt
- Once you have obtained the Challenge Code, you must register it at our website to obtain the License Code. This may be done from any computer with Internet access. To complete the registration and obtain the license code, access the following URL in your web browser:
http://register.softwarefx.com/licensecode/
- Click the "Obtain License Code" link and paste the Challenge code and submit. The License code will be returned to you in a browser. Copy and save the License Code.
- Modify the cfxjava.lic file located on your server by overwriting the contents of the with the newly obtained License Code. Save cfxjava.lic.
- Restarting the server will load all the required licensing information.
Notes:
- Information specific to the server is recorded in the challenge code when generate, therefore, you must generate the Challenge Code on the physical server which you intend to install the Chart FX for Java product.
- If you are moving the installation from one server to another, the activation process must be completed on the new server to obtain the required licensing.
- Because serial numbers exist which may be used to install both the Development and Production versions of the software, it is required that the appropriate cfxjava.lic is used to generate the challenge code. The original content of this file is used in conjunction with the serial number to generate a challenge code for either a Development or Production installation. Therefore, it is important the appropriate cfxjava.lic file is used for each installation. **If you are migrating the installation, your old server cfxjava.lic file will contain the same required data as the original needed to complete the activation process on the new server.
- The Chart FX for Java installer will complete the activation process with no hassle, and is available in many different operating systems.
- For more information, please go to http://register.softwarefx.com/licensecode
|