User rating: 0
Joined: Wed 16 Nov, 2011, 12:28 Posts: 2 Location: HU
I would like to use sqlite library (sqlitejdbc-v056.jar) in my strategy code, however I could not figure out the exact usage of @Library annotation for my case. I tried:
11:12:21 ---------- 11:12:21 Syntax error, insert "EnumBody" to complete EnumDeclaration 11:12:21 ^ 11:12:21 @Library("c:\\Users\\sqlitejdbc\\sqlitejdbc-v056.jar"); 11:12:21 4. ERROR in C:\Users\DR\AppData\Local\Temp\jfxide\tmp\StrategyX.java (at line 47) 11:12:21 ---------- 11:12:21 Syntax error, insert "enum Identifier" to complete EnumHeaderName 11:12:21 ^ 11:12:21 @Library("c:\\Users\\sqlitejdbc\\sqlitejdbc-v056.jar"); 11:12:21 3. ERROR in C:\Users\DR\AppData\Local\Temp\jfxide\tmp\StrategyX.java (at line 47) 11:12:21 ---------- 11:12:21 The attribute value is undefined for the annotation type Library 11:12:21 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 11:12:21 @Library("c:\\Users\\sqlitejdbc\\sqlitejdbc-v056.jar"); 11:12:21 2. ERROR in C:\Users\DR\AppData\Local\Temp\jfxide\tmp\StrategyX.java (at line 47) 11:12:21 ---------- 11:12:21 Library cannot be resolved to a type 11:12:21 ^^^^^^^ 11:12:21 @Library("c:\\Users\\sqlitejdbc\\sqlitejdbc-v056.jar"); 11:12:21 1. ERROR in C:\Users\DR\AppData\Local\Temp\jfxide\tmp\StrategyX.java (at line 47) 11:12:21 ----------
Could anybody help me to understand better? Thank you in advance.
User rating: 0
Joined: Wed 16 Nov, 2011, 12:28 Posts: 2 Location: HU
Thank you for your advice.
I have added the Library import (com.dukascopy.api.Library), it is better now, but the enum error massages persist (please find them at the end).
In Eclipse (where it is working fine) it is even not imported explicitly, only it is in the built path and the following code is used (this code snippet is from an example): Class.forName("org.sqlite.JDBC");
Which is, as far as I understand, a direct reference to the named class object. Just for exploration, if I use this configuration in the platform, the location of the jar file, certainly, is not given (it should be a problem). At compilation time there is no error (actually it is expected), however at runtime, also without error, the sqlite calls are not working. If import the jar file using the Library annotation I have got the enum error. Where am I wrong?
I appreciate you help.
18:45:45 ---------- 18:45:45 Syntax error, insert "EnumBody" to complete EnumDeclaration 18:45:45 ^18:45:45 @Library("c:\\Users\\sqlitejdbc\\sqlitejdbc-v056.jar"); 18:45:45 2. ERROR in C:\Users\DR\AppData\Local\Temp\jfxide\tmp\StrategyX.java (at line 48) 18:45:45 ---------- 18:45:45 Syntax error, insert "enum Identifier" to complete EnumHeaderName 18:45:45 ^18:45:45 @Library("c:\\Users\\sqlitejdbc\\sqlitejdbc-v056.jar"); 18:45:45 1. ERROR in C:\Users\DR\AppData\Local\Temp\jfxide\tmp\StrategyX.java (at line 48)18:45:45 ----------
You have to make sure that the jar file knows where its dependencies are, by doing one of the two: 1) include all necessary jars in the annotation, for example: