How to include Price History API in Java?

From FxCodeBaseWiki
Jump to: navigation, search

The article discusses how to include Price History API in Java application.

Details

Let's say Price History API is installed to C:\Program Files\Candleworks\PriceHistoryAPI.

To include Price History API in your Java application, you should:

1. Add pricehistorymgr.jar to the libraries

In NetBeans: Libraries->Add JAR/Folder

In Eclipse: Project->Properties->Java Build Path->Libraries tab->Add External JARs

Add: C:\Program Files\Candleworks\PriceHistoryAPI\bin\java\pricehistorymgr.jar

2. Change working directory

In Netbeans: Run->Working Directory

In Eclipse: Project->Properties->Run/Debug Settings->New->(Select Configuration Type)->Main tab (Pick the main class)->Arguments tab->Working Directory (click "Other")

Add: C:\Program Files\Candleworks\PriceHistoryAPI\bin

3. Send java.library.path to Java VM

In Netbeans: Project->Properties->Run->VM options

In Eclipse: Project->Properties->Run/Debug Settings->(pick up configuration you just created)->Arguments tab->VM arguments

Add: -Djava.library.path=.;./java

4. Add package com.candleworks.pricehistorymgr to your project:

import com.candleworks.pricehistorymgr.* ;

This Article in Other Languages

Language: English  • español