Skip to Content
avatar image
Former Member

Java version [8] is not compatible with the currently specified runtime;

2018-02-08-10-32-32.pngHi,

I have a problem while running my program on HCP, I am getting which message.

Java version [8] is not compatible with the currently specified runtime; use runtime neo-java-web 2.x or 3.x or neo-javaee7-wp 1.x

I tried already all SDK variants and JREs, but the problem is still the same.

Could you help me please with that issue?

Best regards,

Inna

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 08 at 04:12 PM

    Hi Inna,

    First, which "server" definition did you use to deploy the war file locally? The error states that your project was compiled to use a java version that is not compatible with the runtime that is to be found on SCP.

    If you have used Web Profile, check that you are in fact using WP version 7. Personally I like to use Tomcat 7 or Tomcat 8 for the runtime.
    This will indicate the system which SDK to use during local deployment. However, this is not the only place where java runtime is specified. If you are using Maven, there is a special tag where you need to specify the SDK version to be used. That version needs to match the JRE definition of your project. If you are using WTP (Dynamic Web Project), there is also a Java Version definition there in the Facet.

    Here is how I configure my project:

    If you are using maven, here is an example of pom.xml using Tomcat 8 SDK. After you change the variables you need to update the project to reflect such changes:

    During deployment to SCP, you need to specify the runtime to be used as well. Each Server configuration on Eclipse will be assigned to a deployment definition. So, if you have it already an SCP instance, than you should double click on the "servers view" and change it to mach the SDK specified by WTP or Maven (pom.xml).

    When using pom.xml, verify that you update the project definition matching the pom. There is a menu option when you right-click on the project:

    Regards,
    Ivan

    Add comment
    10|10000 characters needed characters exceeded