Skip to Content

ESR/NWDS UDF - "strings in switch are not supported in -source 1.5"

Dear SAP Community

During development in the ESR and NWDS, when I tried to use string with switch statement, I got the following error "Strings in switch are not supported in source -1.5. Use -source 7 or higher to enable strings in switch". Seems that complier is trying to use JDK in version 1.5 instead at least 7... Based on the information in the NWA we are using the SAPJVM 8 (It is NW 7.5).

I wonder if there is any Java property in the NWA that should be adjusted to use correct JDK? I have found this blog:

https://blogs.sap.com/2016/08/24/configuring-jdk-settings-with-nwdi/

But this is for the NWDI, and I can't see these properties in my NWA.

Did you every had similiar error in the ESR/NWDS?

Best regards,

Artur

oiunj.png (56.8 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Aug 21, 2017 at 11:44 AM

    Hi,

    I just got this response from SAP, it will be delievered with SP 9 for NW 7.5.

    "I also discussed the issue internally and the main issue here is that the java8 version is not taken as java mapping compile version internally and hence the error.

    Our development support has documented this in the SAP note 2316194 - SAP PI 7.50 Message Mapping UDF and Java Mapping support only JDK 1.5.

    They are also working on removing this restriction and it will be later notified as a note. The feature will be delivered in 7.5 SP 9, which is still is development."

    Best regards,

    Artur

    Add comment
    10|10000 characters needed characters exceeded