With the release of 7.50, EP now runs with SAP JVM 8, which is JDK 8 compliant Java VM, to keep up with the speed of innovation and enable customers to benefit from new Java features.

Here is some info that may assist you you understand the differences and issues you may encounter migrating from older java versions.

 

  • Java 8 provides some new cool features like Lambdas and Concurrency, new Date Time API, Nashorm Javascript , Interface Default , Method reference and more.
  • 🙂 You may now use this in your portal application running in EP 7.50 !
  • 🙁 However , it also have some pitfalls. Some of them are incompatibilities with older java versions.

 

ℹ All SAP applications provided with EP 7.50 are compatible with Java 8.

You may want to inspect and fix any custom application that you have to make it Java 8 compliant.

 

Sample issues that you may encounter in your java code related to Java version:

 

1. Dependencies changes:

With Java 8, when using a class, the interfaces it implements must be on the compile classpath as well. With Java 7, it was enough that the interface was on the classpath while compiling the used class.

Given a jar api.jar containing an interface, and a jar api-impl.jar containing an implementation of the interface. While compiling source code that is dependent on the concrete implementation, you obviously need api-impl.jar on the classpath. With Java 8, additionally, you need to have api.jar on the classpath, even when you do not reference the API.

2. Deprecated and removed APIs:

assert / assertTrue deprecation:

    response.assert(ok," : default value is not null","1002001"); --> deprecated and will not compile with java 8
    response.assertTrue(ok," : default value is not null","1002001"); --> will compile correctly.

PreparedStatement interface has new methods, so if you have class implementing it, you should add new methods:

class PlStmt implements PreparedStatement
{..
.
public void closeOnCompletion() throws SQLException{....}
public boolean isCloseOnCompletion() throws SQLException{....}
public long executeLargeUpdate() throws SQLException{...}
public void setObject(int parameterIndex, Object x, SQLType targetSqlType,int scaleOrLength) throws SQLException{...}
public void setObject(int parameterIndex, Object x, SQLType targetSqlType) throws SQLException{....}
...
}

You can use the following link for learning the exact incompatibilities of Java 8 with previous versions:

The suggestion is first try to build your applications with SAP JVM8 and fix any build issues, afterwards try to deploy and execute it.

 

Further reading for your reference:

 

 

ℹ Still have questions? Post them in the migration and upgrade forum.

 

You want to influence the future product roadmap of Enterprise Portal? You plan to implement your portal in the Cloud? Then you should participate in the following survey https://blogs.sap.com/2016/10/11/2016-elections-vote-now/.

 

Thanks!

Tal

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

    1. Michal Zilcha-Lang

      hi,

      Basically the applications developed in WD 7.4 are working on 7.5.

      Of course unless there are specific JDK changes that are being used (1.6 -> 1.8).


      Thanks & regards,

      Michal

      (0) 

Leave a Reply