Dukascopy Support Board http://www.dukascopy.com/swiss/english/forex/jforex/forum/ |
|
Obfuscate does not work http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=88&t=50465 |
Page 1 of 1 |
Author: | fxdiler [ Thu 05 Dec, 2013, 10:18 ] |
Post subject: | Obfuscate does not work |
Hello, There is a bug with obfuscate. When I create a new empty strategy and try to compile it obfuscate work ok. Very simple strategies wich print "Hello, word!" or submit one order when compile it obfuscate work ok too. But obfuscate does not work with other strategies which contains some code. Consider example strategy from Strategy Tutorial https://www.dukascopy.com/wiki/#Strategy_Tutorial/Add_Stop_Loss_and_Take_Profit Here is the complete strategy's java file - https://www.dukascopy.com/wiki/files/StopLossStrategy.java. When I try to compile it with obfuscate I get message: 08:55:19 Compiling StopLossStrategy.java and jfx file not created. But when I compile it without obfuscate I get messages: 08:55:28 Compiling StopLossStrategy.java and creates a new jfx file. When I compile it from Eclipse with JForex SDK client.compileStrategy("c:/Documents and Settings/fxdiler/My Documents/JForex/Strategies/StopLossStrategy.java", true); there is next error 2013-12-05 09:12:41.640 INFO JavaGuard2 - Unrecoverable error during obfuscation |
Author: | Ivan35 [ Fri 06 Dec, 2013, 06:14 ] |
Post subject: | Re: Obfuscate does not work |
It happens if there is readOnly=true in @Configurable line. Try it erase and compilation with obfuscate will be ok. |
Author: | API Support [ Fri 06 Dec, 2013, 07:48 ] |
Post subject: | Re: Obfuscate does not work |
Ivan35 is right. Current obfuscation implementation does not support annotations with named parameters: @Configurable(readOnly=true, value="a") Hence, only simple annotations can be used in obfuscated code: @Configurable("a") |
Author: | fxdiler [ Fri 06 Dec, 2013, 11:02 ] |
Post subject: | Re: Obfuscate does not work |
Thanks, with simple annotations all strategies compiled well. |
Page 1 of 1 |