i have a rcp application which uses Java7 features. In my IDE all works fine and i can use the java7 features. I have define and set the execution environment on JavaSE 1.7.
All works fine! But if i deploy my application, the code fragments which uses Java7 features dont work. I get the following Exception:
Quote:
For example (using String-Switch):
Cannot switch on a value of type String for source level below 1.7. Only convertible int values or enum constants are permitted.
My application uses the correct runtime (JRE7). I dont know where's the problem.
Can someone help me ...
On 14.10.2011 09:27, budili wrote:
> Hallo,
>
> i have a rcp application which uses Java7 features. In my IDE all
> works fine and i can use the java7 features. I have define and set the
> execution environment on JavaSE 1.7. All works fine! But if i deploy
> my application, the code fragments which uses Java7 features dont
> work. I get the following Exception:
>
> Quote:
>> For example (using String-Switch):
>> Cannot switch on a value of type String for source level below 1.7.
>> Only convertible int values or enum constants are permitted.
>
>
> My application uses the correct runtime (JRE7). I dont know where's
> the problem.
> Can someone help me ...
Maybe you did not use 1.7 to compile the source when doing the export.
On 18.10.2011 08:49, budili wrote:
> Quote:
>> Maybe you did not use 1.7 to compile the source when doing the export.
>
>
> Hm that's possible, but in the Preferences i have set the jre on 1.7.
> Is this enough?
Make sure you also specify the execution environment in the manifest file.