Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

JFX - import library build path?
 Post subject: JFX - import library build path? Post rating: 0   New post Posted: Sat 11 Jul, 2009, 05:14 

User rating: 0
Joined: Wed 08 Jul, 2009, 00:42
Posts: 14
Within the Strategies IDE of the JForex platform - where can I define additional library search paths that I want to import?

I want to import a jar file for use in my strategies.

Thanks


 
 Post subject: Re: JFX - import library build path? Post rating: 0   New post Posted: Sat 11 Jul, 2009, 12:05 
User avatar

User rating: 3
Joined: Wed 18 May, 2011, 16:25
Posts: 331
Location: SwitzerlandSwitzerland
you can use @Library(...)

Example:
@Library("C:\\...\\My_Strategies\\my.jar")


 
 Post subject: Re: JFX - import library build path? Post rating: 0   New post Posted: Sat 11 Jul, 2009, 13:35 

User rating: 0
Joined: Wed 08 Jul, 2009, 00:42
Posts: 14
RoadRunner wrote:
you can use @Library(...)

Example:
@Library("C:\\...\\My_Strategies\\my.jar")


It compiles now - thanks.


 
 Post subject: Re: JFX - import library build path? Post rating: 0   New post Posted: Fri 17 Jul, 2009, 21:21 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
in latest version if you put just like
@Library("jftoolbox-1.4.jar") - without full path, compiler will search it in ~/My Strategies/files


 
 Post subject: Re: JFX - import library build path? Post rating: 0   New post Posted: Fri 02 Oct, 2009, 14:58 

User rating: 0
Joined: Fri 02 Oct, 2009, 14:36
Posts: 3
Is there some special syntax for the @Library notation?

package jforex;

import java.util.*;

import com.dukascopy.api.*;

@Library("Minimal.jar");

public class saveStrategy implements IStrategy {
   private IEngine engine;
   private IConsole console;

etc

I'm seeing

Syntax error, insert "EnumBody" to complete EnumDeclaration
^
@Library("Mimimal.jar");
2. ERROR in /tmp/jfxide/tmp/saveStrategy.java (at line 7)
----------
Syntax error, insert "enum Identifier" to complete EnumHeaderName
^
@Library("Minimal.jar");
1. ERROR in /tmp/jfxide/tmp/saveStrategy.java (at line 7)
----------
Compiling...


needless to say, Minimal.jar really is Minimal

public class Minimal {

}
:D

similar errors from more consequential libs, it's definitely in ~/My Strategies/files, similar errors when specifying a full path; no "file not found" error as could happen when the path is incorrect

thanks in advance for your assistance

Mark


 
 Post subject: Re: JFX - import library build path? Post rating: 0   New post Posted: Fri 02 Oct, 2009, 15:05 

User rating: 0
Joined: Fri 02 Oct, 2009, 14:36
Posts: 3
found it already, it's the ;
@Library("Minimal.jar")

seems to work :D


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com