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.

.stream().forEach... cannot be compiled?
 Post subject: .stream().forEach... cannot be compiled? Post rating: 0   New post Posted: Mon 30 Oct, 2017, 15:36 
User avatar

User rating: 0
Joined: Sat 02 Aug, 2014, 10:12
Posts: 23
Location: China, Shijiazhuang
            ordersToUpdate.stream().forEach((o) -> {
                try {
                    o.waitForUpdate(ORDER_TIMEOUT, CLOSED, CANCELED);
                } catch (JFException e) {
                    warn("Caught a JFException when close order #", o.getId(), " - "
                            , e.toString());
                }
            });

When I compile the codes above,these errors come out:
2017-10-30 14:29:14 1. ERROR in ...\jfxide\tmp\compile\Test.java (at line 154)
2017-10-30 14:29:14 ordersToUpdate.stream().forEach((o) -> {
2017-10-30 14:29:14 ________________try_{
2017-10-30 14:29:14 ^^^^^^^^^^^^^^^^^^^^^^^^^^
2017-10-30 14:29:14 Syntax error on tokens, delete these tokens

May someone help me?


 
 Post subject: Re: .stream().forEach... cannot be compiled? Post rating: 0   New post Posted: Mon 30 Oct, 2017, 15:40 
User avatar

User rating: 0
Joined: Sat 02 Aug, 2014, 10:12
Posts: 23
Location: China, Shijiazhuang
By the way,those codes below can be compiled as well:
for (IOrder o : ordersToUpdate) {
                try {
                    o.waitForUpdate(ORDER_TIMEOUT, CLOSED, CANCELED);
                } catch (JFException e) {
                    warn("Caught a JFException when close order #", o.getId(), " - "
                            , e.toString());
                }
            }


So, I doubt that, .stream().forEach can't be compiled in JForex. Is that right?


 
 Post subject: Re: .stream().forEach... cannot be compiled? Post rating: 1   New post Posted: Tue 31 Oct, 2017, 16:03 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Yes, currently we support only Java 7 in the JForex Client editor.


 

Jump to:  

cron
  © 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