Dear support, I can't seem to get the tester client to convert any strategies to .jfx files. I'm basically trying to make the minimal app which would get a jar and output a .jfx strategy. I currently have the following setup:
package JForex;
import com.dukascopy.api.system.ITesterClient;
import com.dukascopy.api.system.TesterFactory;
import java.nio.file.Paths;
public class Converter {
public static void main(String[] args) throws Exception {
String jnlpUrl = "https://platform.dukascopy.com/demo/jforex.jnlp";
String userName = "foo";
String password = "bar";
String absolutePath = "C:\\mystrategy.jar";
final ITesterClient client = TesterFactory.getDefaultInstance();
client.connect(jnlpUrl, userName, password);
//wait for it to connect
int i = 10; //wait max ten seconds
while (i > 0 && !client.isConnected()) {
Thread.sleep(1000);
i--;
}
if (!client.isConnected()) {
System.exit(1);
}
try {
client.packToJfx(Paths.get(absolutePath).toFile());
} catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
System.exit(0);
}
}
Provided with a valid demo Username/pw combination, it does connect and exits with code 0, but no jfx file appears as described
here. The specified Jar does have the necessary META-INF/MANIFEST.MF entry. Is there something fundamentally wrong with this approach, or is it more likely my jar? Could you please provide a minimal working proof-of-concept?
Thank you in advance!