lucab617
Ok well I trying to follow the tutorial to create the Data Provider, but am having trouble compiling the DataProvider.java file that I have. I have created a com.lightstreamer.adapters.stockquotesystem in the Lightstreamer\adapters folder and have put my provider into this folder along with the adapters.xml file. When I compile the DataProvider I get the following errors, can someone help?
C:\Lightstreamer_Moderato\Lightstreamer\adapters\com\lightstreamer\adapters\stoc
kquotesystem>javac StockQuoteSystem.java
StockQuoteSystem.java:8: package com.lightstreamer.interfaces.data does not exis
t
import com.lightstreamer.interfaces.data.DataProvider;
^
StockQuoteSystem.java:9: package com.lightstreamer.interfaces.data does not exis
t
import com.lightstreamer.interfaces.data.DataProviderException;
^
StockQuoteSystem.java:10: package com.lightstreamer.interfaces.data does not exi
st
import com.lightstreamer.interfaces.data.FailureException;
^
StockQuoteSystem.java:11: package com.lightstreamer.interfaces.data does not exi
st
import com.lightstreamer.interfaces.data.ItemEventListener;
^
StockQuoteSystem.java:12: package com.lightstreamer.interfaces.data does not exi
st
import com.lightstreamer.interfaces.data.SubscriptionException;
^
StockQuoteSystem.java:14: cannot find symbol
symbol: class DataProvider
public class StockQuoteSystem implements DataProvider {
^
StockQuoteSystem.java:16: cannot find symbol
symbol : class ItemEventListener
location: class com.lightstreamer.adapters.stockquotesystem.StockQuoteSystem
private ItemEventListener listener;
^
StockQuoteSystem.java:19: cannot find symbol
symbol : class DataProviderException
location: class com.lightstreamer.adapters.stockquotesystem.StockQuoteSystem
public void init(Map params, File configDir) throws DataProviderException {
^
StockQuoteSystem.java:24: cannot find symbol
symbol : class SubscriptionException
location: class com.lightstreamer.adapters.stockquotesystem.StockQuoteSystem
throws SubscriptionException {
^
StockQuoteSystem.java:29: cannot find symbol
symbol : class ItemEventListener
location: class com.lightstreamer.adapters.stockquotesystem.StockQuoteSystem
public void setListener(ItemEventListener listener) {
^
StockQuoteSystem.java:36: cannot find symbol
symbol : class SubscriptionException
location: class com.lightstreamer.adapters.stockquotesystem.StockQuoteSystem
throws SubscriptionException, FailureException {
^
StockQuoteSystem.java:36: cannot find symbol
symbol : class FailureException
location: class com.lightstreamer.adapters.stockquotesystem.StockQuoteSystem
throws SubscriptionException, FailureException {
^
StockQuoteSystem.java:48: cannot find symbol
symbol : class SubscriptionException
location: class com.lightstreamer.adapters.stockquotesystem.StockQuoteSystem
public synchronized void unsubscribe(String itemName) throws SubscriptionEx
ception,
^
StockQuoteSystem.java:49: cannot find symbol
symbol : class FailureException
location: class com.lightstreamer.adapters.stockquotesystem.StockQuoteSystem
FailureException {
^
14 errors
lucab617
Quick question do I need to create this in eclipse? Can someone help me out with this? Any help would be greatly appreciated.
Thanks.
Alessandro Alinone
To compile an Adapter, you need to include the Adapter interface in the Java compiler classpath. So, add ls-adapter-interface.jar file (located in “Lightstreamer/DOCS-SDKs/sdk_adapter_java/lib” within your installation) to your compiler classpath, be it command line or Eclipse.
lucab617
Got it to work.