• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to set Java version in XCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set Java version in XCode


  • Subject: Re: How to set Java version in XCode
  • From: Justa Developer <email@hidden>
  • Date: Fri, 8 Jan 2010 14:28:11 -0800 (PST)

Thanks Greg.

Setting the source to 1.6 solved the first build problem that I had ("generics are not supported in -source 1.3").

However, and I did not realize this until I fixed the above problem, there is another compile error that triggers in build.xml.  It triggers if the source is 1.3 or 1.6.  It says "Compile failed; see the compiler error output for details."  However, I do not know where to fin the compiler error output.  For example, if I click Build -> Build Results I do not get any additional information.  The XML that triggers it is:

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


I am running XCode 3.0 on a Macbook running OS 10.5.8.  Attached is my test program that fails.

Thanks.  Ari




From: Greg Guerin <email@hidden>
To: list Xcode-users <email@hidden>
Sent: Fri, January 8, 2010 1:33:19 PM
Subject: Re: How to set Java version in XCode

Justa Developer wrote:

> It seems to me that there is a Java language version flag which is set somewhere to 1.3.  Presumably I want to set it to 1.6.  However, I don't see where to set this.


If you're using the default Xcode Java templates, it's in the build.xml file.

Find the word javac between <>'s.  Look for source="nn" and target="nn" attributes.  Change them.

  -- GG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

import java.util.*;

public class test
{
    public static void main(String[] args)
    {
        ArrayList<String> codes = new ArrayList<String>();
        codes.add("mcb2");
        codes.add("java");
        codes.add("jsps");
    }
}
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: How to set Java version in XCode (From: Greg Guerin <email@hidden>)

  • Prev by Date: Re: How to set Java version in XCode
  • Next by Date: How to set Java version in XCode (Justa Developer)
  • Previous by thread: Re: How to set Java version in XCode
  • Next by thread: Re: How to set Java version in XCode
  • Index(es):
    • Date
    • Thread