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.

Problems with strategie on Java version higher 1.6.0_26
 Post subject: Problems with strategie on Java version higher 1.6.0_26 Post rating: 0   New post Posted: Thu 27 Oct, 2011, 07:46 

User rating: 0
Joined: Thu 28 Jul, 2011, 11:38
Posts: 9
Location: GermanyGermany
Hi,

do you have probmes with your stratgie (crashing) if you use a Java version higher than 1.6.0_26, like 1.6.0_29 or 1.7.0_1 ?

Tryed 32 and 64bit as well... hangs up for me, when i try to catch getOut() or getErr() for console.


 
 Post subject: Re: Problems with strategie on Java version higher 1.6.0_26 Post rating: 0   New post Posted: Tue 22 Nov, 2011, 18:43 

User rating: 0
Joined: Tue 22 Nov, 2011, 18:40
Posts: 4
Location: DE
I can confirm this problem. I have Java version 1.6.0_29 installed on my Windows 7 32-bit system.
Please help us!

Thanks,

sloster


 
 Post subject: Re: Problems with strategie on Java version higher 1.6.0_26 Post rating: 0   New post Posted: Wed 23 Nov, 2011, 17:34 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Presumably this is due to changes in java security settings with jdk versions 1.6.0_27 or 1.6.0_29. As a workaround please consider
a) using @RequiresFullAccess,
b) or using an alternative console implementation, for instance:
package jforex.test;

import java.io.PrintStream;

import com.dukascopy.api.*;

/**
 * The strategy uses an alternative console implementation,
 * which prints messages to the java console.
 *
 * Enable java console the following way:
 * Start > Settings > Control panel > Java > Advanced > Java console, then select "Show console"
 *
 */
public class ConsoleWorkaround implements IStrategy {

   IConsole console;
   
   @Override
   public void onStart(IContext context) throws JFException {
      this.console = new JavaConsole();
      console.getOut().println("strategy start");
      
   }

   @Override
   public void onTick(Instrument instrument, ITick tick) throws JFException {}

   @Override
   public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {}

   @Override
   public void onMessage(IMessage message) throws JFException {}

   @Override
   public void onAccount(IAccount account) throws JFException {}

   @Override
   public void onStop() throws JFException {}
   
   class JavaConsole implements IConsole {
      public PrintStream getOut() { return System.out; }
      public PrintStream getErr() { return System.err; }      
   }

}


 
 Post subject: Re: Problems with strategie on Java version higher 1.6.0_26 Post rating: 0   New post Posted: Mon 28 Nov, 2011, 22:08 

User rating: 0
Joined: Thu 28 Jul, 2011, 11:38
Posts: 9
Location: GermanyGermany
The workarounds are good, but will there be an update for platform, to get back to normal usage? Don't wanna force fullaccess request... even that jconsole route...


 
 Post subject: Re: Problems with strategie on Java version higher 1.6.0_26 Post rating: 0   New post Posted: Tue 29 Nov, 2011, 08:20 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
The platform will be released as soon as available.


 

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