L lilili macrumors newbie Original poster Feb 29, 2008 #1 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
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
M Mernak macrumors 6502 Mar 1, 2008 #2 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.
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.
L lilili macrumors newbie Original poster Mar 1, 2008 #3 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?
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?
G giancarloromeo macrumors newbie Apr 20, 2008 #4 lilili said: Now, do I always have to edit build.xml for every java5 project or I can make it default to 1.5 somehow? Click to expand... Look at this http://giancarloromeo.netsons.org 😉
lilili said: Now, do I always have to edit build.xml for every java5 project or I can make it default to 1.5 somehow? Click to expand... Look at this http://giancarloromeo.netsons.org 😉