Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

How to get ClientFactory object and the default IClient
 Post subject: How to get ClientFactory object and the default IClient Post rating: 0   New post Posted: Fri 26 Jul, 2013, 18:22 

User rating: 0
Joined: Tue 28 Aug, 2012, 14:52
Posts: 16
My code :
IClient client = ClientFactory.getDefaultInstance();


When I compile it have error as:
Quote:
2013-07-26 17:20:23 Unhandled exception type ClassNotFoundException
2013-07-26 17:20:23 this.client = ClientFactory.getDefaultInstance();


So how I can get the default IClient and ClientFactory?


 
 Post subject: Re: How to get ClientFactory object and the default IClient Post rating: 0   New post Posted: Sat 27 Jul, 2013, 01:22 

User rating: 0
Joined: Tue 28 Aug, 2012, 14:52
Posts: 16
I resolve the error. It works after I catch the exception.
        try {
            this.client = ClientFactory.getDefaultInstance();
        } catch (ClassNotFoundException e1) {
                e1.printStackTrace();
        } catch (IllegalAccessException e2) {
                e2.printStackTrace();
        } catch (InstantiationException e3) {
                e3.printStackTrace();
        }


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com