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.

JForex Strategy Compiler external jars ?
 Post subject: JForex Strategy Compiler external jars ? Post rating: 0   New post Posted: Tue 27 Nov, 2012, 22:32 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
I want to use a function in javax.jnlp from within a Strategy module.

How can I reference the appropriate javax jar file from within the built-in Strategy compiler in the JForex platform, so I can compile my jfx object? In this case, I don't want any dependent jars; just a single textual .java source which implements IStrategy.

Normally I've been doing this through additional precompiled jars in Eclipse.

Here's what I'd like to do and the compiler needs to resolve the javax.jnlp.BasicService type, for example.

   // Method to show a URL 
   private boolean showURL(URL url) {
          try {
              // Lookup the javax.jnlp.BasicService object
              BasicService bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
              // Invoke the showDocument method
              return bs.showDocument(url);
          } catch(Exception ue) {
              // Service is not supported
              return false;
          }
       }



Thanks !
HyperScalper


 
 Post subject: Re: JForex Strategy Compiler external jars ? Post rating: 0   New post Posted: Tue 27 Nov, 2012, 23:19 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Well, I guess I'm not very smart :) It looks like this is one way to do it, anyway.

That's the jar containing javax.jnlp.BasicService, etc.

@Library("javaws.jar")


 

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