Mad-Halfling
Joined: Sun Jun 22, 2008 2:05 am Posts: 4
|
Posted: Sun Jan 27, 2013 5:12 pm Post subject: Setting ant -source parameter for Android Coding Academy |
|
|
Having a bit of a brain-failure. I'm poking my way around the Android coding academy sections and in part 2 I'm getting a compiler error when I run
| Code: | [javac] /home/(user)/Coding/countdown/src/com/example/countdown/CountdownActivity.java:60: error: strings in switch are not supported in -source 1.5
[javac] switch(item.getItemId()) {
[javac] ^
[javac] (use -source 7 or higher to enable strings in switch)
|
but I can't find where to set this parameter. I've got openjdk-7 installed and JAVA_HOME points to
| Code: | | /usr/lib/jvm/default-java -> java-1.7.0-openjdk-amd64 |
So where do I set this (I'm sure it's something simple, but ant doesn't accept the -source parameter and Google hasn't brought up the config details)?
Note that this compiler error is the result of a typo, but I was wondering how to do this for future reference, or in case I want to use this in future.
Cheers - MH |
|