It's all about the answers!

Ask a question

Error: Cannot switch on a value of type String. Only convertible int values or enum constants are permitted EVEN WITH JDK 1.7.


Sharath Krishna (3214) | asked Nov 04 '16, 12:55 a.m.
I have to build a project which has a code that uses the 'String in switch case' feature. Even though the compiler is set to jdk 1.7, the build fails showing that error. I checked the compiler settings in my sandbox, and set jdk 1.7 everywhere. The error is not shown in my sandbox, but then when I build, compilation error pops up saying "Cannot switch on a value of type String. Only convertible int values or enum constants are permitted". Even in build tool, the compiler is set to jdk 1.7
What can be the possible issue??

I use 
IBM Rational® Application Developer for WebSphere® Software

Version: 9.1.1
Build ID: RADO911-I20141014_1328.
Build Forge as Build tool.

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.