Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lilili

macrumors newbie
Original poster
Feb 29, 2008
3
0
Hi everyone
I am trying to compile my java code in xcode but it keep saying
generics are not supported in 1.3.

while trying to compile the same code using javac in terminal works fine.
I'm wondering how can I change the java compiler xcode use?

Thanks
 

Mernak

macrumors 6502
Apr 9, 2006
435
16
Kirkland, WA
Interesting, I never knew that it want to use 1.3 now, it used to be okay with 1.5. Anyways there should be a "build.xml" file in the project and it should have a segment like this
Code:
	<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}">
changing the source and target to 1.5 should fix that. I had the same problem in another java IDE (Java Studio Creator 2).

Please note that I have not actually done this myself to make sure it works, but I am pretty sure that it will.
 

lilili

macrumors newbie
Original poster
Feb 29, 2008
3
0
Mernak, you the man.
That's the remedy i've been looking for.

Now, do I always have to edit build.xml for every java5 project or I can make it default to 1.5 somehow?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.