Issue with @Library annotation - cannot include multiple jar files in the description

Hi,

Hoping someone can help.

I'm developing a java application using the jforex api, and I need to load multiple jar libraries for the strategy.
Should be simple enough, however the compiler does not seem to recognise the file separator character.



@RequiresFullAccess
@Library("/Users/user/JForex/Strategies/files/log4j-1.2.16.jar")
public class MyStrategy implements IStrategy {
.
.

- COMPILES FINE

@RequiresFullAccess
@Library("/Users/user/JForex/Strategies/files/log4j-1.2.16.jar;/Users/user/JForex/Strategies/files/mysql-connector-java-5.1.7-bin.jar")
public class MyStrategy implements IStrategy {
.
.

- Compiler spits out the following error:
File /Users/user/JForex/Strategies/files/log4j-1.2.16.jar;/Users/user/JForex/Strategies/files/mysql-connector-java-5.1.7-bin.jar not found.

The problem is NOT a missing file and only happens when more than one jar file is listed, despite both being there.

I'm not sure this is the right area to post this type of question.
Using Java 7 and MacOS Maverick.

Any ideas would be appreciated?

Translate to English Show original

Mehfooz avatar
Mehfooz 30 Nov.

contact support chat
or email at
support@dukascopy.com

orto leave comments

Answers: 3

Best Answer

Hey there,

the message indicates that the compiler looks for one file, "/Users/user/JForex/Strategies/files/log4j-1.2.16.jar;/Users/user/JForex/Strategies/files/mysql-connector-java-5.1.7-bin.jar", not /Users/user/JForex/Strategies/files/log4j-1.2.16.jar" and "/Users/user/JForex/Strategies/files/mysql-connector-java-5.1.7-bin.jar".

http://www.dukascopy.com/client/javadoc/com/dukascopy/api/Library.html just gives one parameter for a .jar file, while the description says libraries. I think the technical support has to clarify this

Translate to English Show original
11 Feb. 2014 by

Mehfooz avatar
Mehfooz 30 Nov.

good job

orto leave comments

Found the answer on another forum for anyone interested
- Mac and Linux machines use a ':' for the file separator (as apposed to ';' used in the windows box examples in the jforex API examples)

Translate to English Show original
12 Feb. 2014 by

Mehfooz avatar
Mehfooz 30 Nov.

good job

orto leave comments

abstract may include several fields

Translate to English Show original
4 Mar. 2015 by

orto leave comments
Please log in or register to post answer.