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 SDK and JRE 11
 Post subject: JForex SDK and JRE 11 Post rating: 0   New post Posted: Fri 18 Dec, 2020, 15:09 

User rating: 0
Joined: Fri 28 Feb, 2020, 14:55
Posts: 9
Location: Bulgaria,
I use Eclipse as IDE. Ever since the Eclipse 2020-09 release, I cannot run Eclipse and instead get the following error:

Incompatible JVM - Version 1.8.0_271 of the JVM is not suitable for this product. Version: 11 or greater is required.


However, if I use the latest LTS version (JDK 11), I get warnings:

Build path specifies execution environment JavaSE-1.8. There are no JREs installed in the workspace that are strictly compatible with this environment.
The compiler compliance specified is 1.8 but a JRE 15 is used.


I see that some parts of the JForex SDK code are deprecated in respect to newer java versions (versions greater than 8). This means that I should stick to 8.

However using an outdated Eclipse version (with bugs and security issues) is not an option either.

What should I do? And when will the JForex SDK be updated to comply with Java 11?


 
 Post subject: Re: JForex SDK and JRE 11 Post rating: 0   New post Posted: Wed 30 Dec, 2020, 12:09 
User avatar

User rating: 70
Joined: Sat 22 Sep, 2012, 17:43
Posts: 118
Location: Brazil, Fortaleza, Ceará
Quote:
Incompatible JVM - Version 1.8.0_271 of the JVM is not suitable for this product. Version: 11 or greater is required.
This is critical as the Eclipse 2020-09 codebase is compiled against Java 11. Seems you have solved this by installing or defaulting to a v11 or higher JRE.
With your JAVA_HOME variable set to a compatible v11+ JRE, Eclipse 2020-09, 2020-12, etc will work fine.

Quote:
Build path specifies execution environment JavaSE-1.8. There are no JREs installed in the workspace that are strictly compatible with this environment.
The compiler compliance specified is 1.8 but a JRE 15 is used.
This is merely a warning stating that the JRE visible to Eclipse JDT (i.e. the JRE/JDK being used to run/compile your code inside eclipse - separate to the JRE that actually started up Eclipse since these are allowed to be different) is not a "perfect match" for the build target version "1.8".

New JREs/JDKs generally have no problem running/compiling previous version binaries and in this case the message is saying you're using a v15 JRE/JDK environment to run code that has been tagged as v1.8.

You can either:
  • Ignore this message
  • Install a v1.8 JDK (openjdk, oracle, etc) to some folder then go to Window -> Preferences -> Java -> Installed JREs and add a reference to this v1.8 installation.

If you do take the second option, you should also go to Window -> Preferences -> Java -> Installed JREs -> Execution Environments and mark the v1.8 installation as a "perfect match" under the JAVASE-1.8 environment.

Eclipse is quite flexible allowing you to install all versions of the JDK if you really wanted or needed to.
You can control which runtimes are used on a per project basis with: Project -> Properties -> Java Build Path -> Libraries tab -> JRE System Library => Edit and set the project's execution environment.


 

Jump to:  

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