Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Setting ant -source parameter for Android Coding Academy

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming
View previous topic :: View next topic  
Author Message
Mad-Halfling



Joined: Sun Jun 22, 2008 2:05 am
Posts: 6

PostPosted: Sun Jan 27, 2013 5:12 pm    Post subject: Setting ant -source parameter for Android Coding Academy Reply with quote

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:
ant debug


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
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast