Skip to Content

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

Aug 16, 2017 at 09:18 AM


avatar image
Former Member

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:

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,


oiunj.png (56.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
avatar image
Former Member Aug 21, 2017 at 11:44 AM


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,


10 |10000 characters needed characters left characters exceeded