I am running a strategy that uses a jar file to run external classes. I have a superclass of strategy to save time in creating similar strategies.
package jforex;
import main.MasterStrategy;
import com.dukascopy.api.*;
@Library("C:\\Program Files\\Java\\javamail-1.4.2\\lib\\mailapi.jar;C:\\Program Files\\Java\\javamail-1.4.2\\lib\\smtp.jar;C:\\javasource\\main.jar")
public class MyStrategyB5Dfb30 extends MasterStrategy {
.
.
.
Where MasterStrategy looks something like this:
package main;
import com.dukascopy.api.*;
import java.util....;
public abstract class MasterStrategy implements IStrategy {
.
.
.
This was running fine up until now.
However I added a new class that is compiled in to the jar file. I have tested it individually so I know that it works outside of jforex. But whenever I run it in the jforex client, I compile ok and then get the run time error
java.lang.NoClassDefFoundError: main/ExternalClass @ main.MasterStrategy.onStart(MasterStrategy.java:134)
where onStart in Master Strategy looks like this
public void onStart(IContext context) throws JFException {
...
ExternalClass external = new ExternalClass(...);
...
}
This is what the error on line 134 is referring to.
Does anyone know what I have done wrong?
Thanks
Rob