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.

Cannot load target class
 Post subject: Cannot load target class Post rating: 0   New post Posted: Thu 14 Apr, 2011, 15:01 

User rating: 0
Joined: Sun 22 May, 2011, 23:43
Posts: 12
Location: Italy, Roma
HI,
during compilation of a IStrategy I'm getting this very short message:

Cannot load target class

I think I've isolated the problem. In fact when I disable this single line of code:

public static XYSeries equityXYseries = new XYSeries("Equity_Line");


then the compilation is successfull.

The XYSeries class belongs to the JFreeChart Library.

The weird thing is that I have another strategy that has the same line of code and uses without issues the JFreeChart Library.

Any help about this issue?

Kind regards,
Paolo


 
 Post subject: Re: Cannot load target class Post rating: 0   New post Posted: Sat 16 Apr, 2011, 12:57 

User rating: 0
Joined: Wed 18 May, 2011, 23:26
Posts: 40
Location: Switzerland,
What do your relevant import and @Library lines look like?

Is this wiki page of any help? https://www.dukascopy.com/wiki/index.php ... _libraries


 
 Post subject: Re: Cannot load target class Post rating: 0   New post Posted: Mon 18 Apr, 2011, 11:33 

User rating: 0
Joined: Sun 22 May, 2011, 23:43
Posts: 12
Location: Italy, Roma
Hi buyandhold,
thanks for your reply ;)

Indeed I had this problem because I forgot to include the two libraries needed by JFreeChart!

Since I develop everything in NetBeans, this was my original code for the strategy:
package jforex;

import my_netbeans_package.*;
import com.dukascopy.api.*;

@Library("my_netbeans_library.jar")
@RequiresFullAccess

public class my_strategy extends my_strategy_abstract implements IStrategy {

}


An this is the fixed code including the other two JFreeChart libraries:
package jforex;

import my_netbeans_package.*;
import com.dukascopy.api.*;

@Library("my_netbeans_library.jar;jcommon-1.0.16.jar;jfreechart-1.0.13.jar")
@RequiresFullAccess

public class my_strategy extends my_strategy_abstract implements IStrategy {

}


 

Jump to:  

cron
  © 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