Changing the SDK source in Xcode

I keep getting this error:

generics are not supported in -source 1.3

which is from here in the build.XML:

 
	<target name="compile" depends="init" description="Compile code">
		<mkdir dir="${bin}"/>
		<javac deprecation="on" srcdir="${src}" destdir="${bin}"
			   source="1.3" target="1.2"
			   includeAntRuntime="no"
			   classpathref="lib.path" debug="${compile.debug}">

Does anyone know how to update the SDK so I can use generics? I’m assuming to J2SE 1.4.2.

change source=“1.3” to 1.5 and so the same for the target option. :slight_smile: Mac OS X is bundled with the JDK 1.5 .

Thanks! I had a feeling that was it (it looks quite obvious doesnt it…) but I didnt want to redirect any paths without being aware of what I was doing. I’d prefer to use Xcode over netbeans just because it is native but it didnt look like that was gonna work. Now I have been having a different problem that I thought was related but apparently not. I am unable to compile at all. I have heard a rumor that Xcode’s compiler doesn’t work on OS X 10.5.2, but that sounds just silly doesnt it? At any rate, I successfully changed the SDK and target but would love to actually compile my code. I know the code is good and compliant because I compiled it on BlueJ. I will say the code is without a main method currently, could that effect it? I was wondering because netbeans wont let me compile single classes either.

xcode is ok with the last jdk 5. You may refer to developer.apple.com for more help. And maybe creating a new ant project with Xcode can solve your problematic issue. :slight_smile: